Open the door of J: CD-ROM drive [td]nircmd.exe cdrom open j: |
Close the door of Y: CD-ROM drive [td]nircmd.exe cdrom close y: |
Increase the system volume by 2000 units (out of 65535) [td]nircmd.exe changesysvolume 2000 |
Decrease the system volume by 5000 units (out of 65535) [td]nircmd.exe changesysvolume -5000 |
Set the volume to the highest value [td]nircmd.exe setsysvolume 65535 |
Mute the system volume [td]nircmd.exe mutesysvolume 1 |
Unmute the system volume [td]nircmd.exe mutesysvolume 0 |
Switch the system volume between the mute and normal state. [td]nircmd.exe mutesysvolume 2 |
Create a shortcut on your desktop that switch the system volume between the mute and normal state. [td]nircmd.exe cmdshortcut "~$folder.desktop$" "Switch Volume" mutesysvolume 2 |
Turn off the monitor [td]nircmd.exe monitor off |
Start the default screen saver [td]nircmd.exe screensaver |
Put your computer in 'standby' mode [td]nircmd.exe standby |
log off the current user [td]nircmd.exe exitwin logoff |
Ask if you want to reboot, and if you answer 'Yes', reboot the computer. [td]nircmd.exe qboxcom "Do you want to reboot ?" "question" exitwin reboot |
Turn off your computer [td]nircmd.exe exitwin poweroff |
Turn off all computers specified in computers.txt ! [td]multiremote copy "c:\temp\computers.txt" exitwin poweroff force |
Dial to "My Internet" connection [td]nircmd.exe rasdial "My Internet" |
Disconnect the "My Internet" connection [td]nircmd.exe rashangup "My Internet" |
Make your Internet Explorer windows 75% transparent ! (192 / 256) [td]nircmd.exe win trans ititle "internet explorer" 192 |
Minimize all your Internet Explorer windows [td]nircmd.exe win min class "IEFrame" |
Close all your Internet Explorer windows [td]nircmd.exe win close class "IEFrame" |
Close all your Explorer windows (My Computer, folders, and so on) [td]nircmd.exe win close class "CabinetWClass" |
Hide all your Internet Explorer windows [td]nircmd.exe win hide class "IEFrame" |
Show all your Internet Explorer windows (after you made them hidden with previous example) [td]nircmd.exe win show class "IEFrame" |
Center all top-level windows [td]nircmd.exe win center alltop |
Remove the title bar of My Computer window. [td]nircmd.exe win -style title "my computer" 0x00C00000 |
Return the title bar of My Computer window that we removed in the previous example. [td]nircmd.exe win +style title "my computer" 0x00C00000 |
Set the My Computer window to right-to-left order (For hebrew and arabic languages) [td]nircmd win +exstyle title "my computer" 0x00400000 |
Set all child windows of My Computer window to right-to-left order (For hebrew and arabic languages) [td]nircmd win child title "my computer" +exstyle all 0x00400000 |
Create a shortcut on your desktop that closes all your Internet Explorer windows [td]nircmd.exe cmdshortcut " "~$folder.desktop$ "Close All IE" win close class "IEFrame" |
Create a shortcut on your desktop that hides all your Internet Explorer windows [td]nircmd.exe cmdshortcut " "~$folder.desktop$ "Hide All IE" win hide class "IEFrame" |
Create a shortcut on your desktop that shows back all your Internet Explorer windows [td]nircmd.exe cmdshortcut " "~$folder.desktop$ "Show All IE" win show class "IEFrame" |
Set the Windows Calculator as top-most window (above all other windows) [td]nircmd.exe win settopmost title "Calculator" 1 |
Set the Windows Calculator back to regular window (non top-most window) [td]nircmd.exe win settopmost title "Calculator" 0 |
Create a shortcut to Windows calculator under Start Menu->Programs->Calculators [td]nircmd.exe shortcut "f:\winnt\system32\calc.exe" "~$folder.programs$\Calculators" "Windows Calculator" |
Hide the desktop window [td]nircmd.exe win hide class progman |
Show the desktop window (After hiding it in previous example) [td]nircmd.exe win show class progman |
Hide the start button on the system tray [td]nircmd.exe win child class "Shell_TrayWnd" hide class "button" |
Show the start button on the system tray [td]nircmd.exe win child class "Shell_TrayWnd" show class "button" |
Hide the clock on the system tray [td]nircmd.exe win child class "Shell_TrayWnd" hide class "TrayClockWClass" |
Show the clock on the system tray [td]nircmd.exe win child class "Shell_TrayWnd" show class "TrayClockWClass" |
Kill (terminate) all instance of Internet Explorer processes [td]nircmd.exe killprocess iexplore.exe |
Create a shortcut on your desktop that opens the door of K: CDROM drive when you run it. [td]nircmd.exe cmdshortcut "~$folder.desktop$" "Open CDROM" cdrom open k: |
Create a shortcut to NirSoft Web site on your desktop [td]nircmd.exe urlshortcut "http://www.nirsoft.net" "~$folder.desktop$" "NirSoft" |
Add NirSoft Web site to your Favorities under Links folder. [td]nircmd.exe urlshortcut "http://www.nirsoft.net" "~$folder.favorites$\Links" "NirSoft" |
Create a shortcut to NirSoft Web site on the desktop of all computers listed in computers.txt [td]nircmd.exe multiremote copy "c:\temp\computers.txt" urlshortcut "http://www.nirsoft.net" "~$folder.common_desktop$" "NirSoft" |
Set the display mode to 800x600x24bit colors [td]nircmd.exe setdisplay 800 600 24 |
Create a shortcut on the desktop that set the display mode to 800x600x24bit colors [td]nircmd.exe cmdshortcut "~$folder.desktop$" "800x600x24" setdisplay 800 600 24 |
Copy all shortcuts on your desktop to another folder (f:\temp\desktop). [td]nircmd.exe execmd copy "~$folder.desktop$\*.lnk" f:\temp\desktop |
Restart your Apache server (under Windows NT/2000/XP/2003) [td]nircmd.exe service restart apache |
Create a shortcut on your desktop that restarts the Apache server [td]nircmd.exe cmdshortcut "~$folder.desktop$" "Restart Apache" service restart apache |
Restart your IIS [td]nircmd.exe service restart w3svc |
Restart MySql [td]nircmd.exe service restart MySql |
Open the desired Registry key/value in RegEdit [td]nircmd.exe regedit "HKLM\Software\Microsoft\Windows\CurrentVersion" "CommonFilesDir" |
Open the Registry key that you copied to the clipboard in RegEdit. [td]nircmd regedit "~$clipboard$" |
Disable the screen saver [td]nircmd.exe regsetval sz "HKCU\control panel\desktop" "ScreenSaveActive" 0 |
Enable the screen saver [td]nircmd.exe regsetval sz "HKCU\control panel\desktop" "ScreenSaveActive" 1 |
Change the date/time of the specified filename (creation time and modified time) [td]nircmd.exe setfiletime "c:\temp\myfile.txt" "24-06-2003 17:57:11" "22-11-2005 10:21:56" |
Copy your desktop folder path to the clipboard [td]nircmd.exe clipboard set ~$folder.desktop$ |
Copy your start menu folder path to the clipboard [td]nircmd.exe clipboard set ~$folder.start_menu$ |
Copy the content of info1.txt (simple text file) to the clipboard [td]nircmd.exe clipboard readfile "c:\My Files\info1.txt" |
Add the text content of clipboard to info1.txt [td]nircmd.exe clipboard addfile "c:\My Files\info1.txt" |
Clear the clipboard [td]nircmd.exe clipboard clear |
Create all folders specified in "c:\temp\folders.txt". The folder path names are separated by CRLF characters. [td]nircmd.exe paramsfile "c:\temp\folders.txt" "" "" execmd md ~$fparam.1$ |
Install the specified .NET assembly in the global assembly cache (like gacutil) [td]nircmd.exe gac install "C:\temp\MyAssembly\bin\MyAssembly.dll" |
Empty the recycle bin in all drives. [td]nircmd.exe emptybin |
Answer 'Yes' to a standard Windows message-box. [td]nircmd.exe dlg "" "" click yes |
1.打开J:光驱的门 ——>nircmd.exe cdrom open j: |
2.关闭Y:光驱的门 ——>nircmd.exe cdrom close y: |
3.把音量增加2000单位 (总共 65535) ——>nircmd.exe changesysvolume 2000 |
4.把音量减少5000 单位 (总共 65535) ——>nircmd.exe changesysvolume -5000 |
5.把音量设置为最大 ——>nircmd.exe setsysvolume 65535 |
6.静音 ——>nircmd.exe mutesysvolume 1 |
7.取消静音 ——>nircmd.exe mutesysvolume 0 |
8.在静音和正常状态间切换 ——>nircmd.exe mutesysvolume 2 |
9.在桌面建立一个在静音和正常状态间切换功能的快捷方式 ——>nircmd.exe cmdshortcut "~$folder.desktop$" "Switch Volume" mutesysvolume 2 |
10.关闭显示器 ——>nircmd.exe monitor off |
11.开启默认的屏幕保护 ——>nircmd.exe screensaver |
12.把电脑置于“等待”模式 ——>nircmd.exe standby |
13.注销当前用户 ——>nircmd.exe exitwin logoff |
14.询问是否重启系统,如果你回答 'Yes',重启电脑 ——>nircmd.exe qboxcom "Do you want to reboot ?" "question" exitwin reboot |
15.关机 ——>nircmd.exe exitwin poweroff |
16.关闭computers.txt文件中指定的所有电脑 ! ——>multiremote copy "c:\temp\computers.txt" exitwin poweroff force |
17.激活“宽带链接” ——>nircmd.exe rasdial "My Internet" |
18.挂掉“ 宽带链接” ——>nircmd.exe rashangup "My Internet" |
19.设置你的IE窗口 透明度为75% ! (192 / 256) ——>nircmd.exe win trans ititle "internet explorer" 192 |
20.最小化所有IE窗口 ——>nircmd.exe win min class "IEFrame" |
21.关闭所有IE窗口 ——>nircmd.exe win close class "IEFrame" |
22.关闭所有的资源管理器 (我的电脑,文件夹,等等) ——>nircmd.exe win close class "CabinetWClass" |
23.隐藏所有IE窗口(老板键?) ——>nircmd.exe win hide class "IEFrame" |
24.显示所有IE窗口 (前提是使用过上面的隐藏命令) ——>nircmd.exe win show class "IEFrame" |
25.把最高级的窗口置中 ——>nircmd.exe win center alltop |
26.取消“我的电脑”名称显示. ——>nircmd.exe win -style title "my computer" 0x00C00000 |
27.恢复显示“我的电脑”,前提是使用过上面的隐藏命令. ——>nircmd.exe win +style title "my computer" 0x00C00000 |
28.把“我的电脑”用从右向左显示 (适用于 hebrew 和 arabic 语言) ——>nircmd win +exstyle title "my computer" 0x00400000 |
29.设置所有“我的电脑”的子窗口用从右向左显示 (适用于 hebrew 和 arabic 语言) ——>nircmd win child title "my computer" +exstyle all 0x00400000 |
30.在桌面建立一个关闭所有IE窗口的快捷方式 ——>nircmd.exe cmdshortcut " "~$folder.desktop$ "Close All IE" win close class "IEFrame" |
31.在桌面建立一个隐藏所有IE窗口的快捷方式 ——>nircmd.exe cmdshortcut " "~$folder.desktop$ "Hide All IE" win hide class "IEFrame" |
32.在桌面建立一个显示所有IE窗口的快捷方式 ——>nircmd.exe cmdshortcut " "~$folder.desktop$ "Show All IE" win show class "IEFrame" |
33.把计算器置于所有窗口之上 ——>nircmd.exe win settopmost title "Calculator" 1 |
34.把计算器置于正常位置 ——>nircmd.exe win settopmost title "Calculator" 0 |
35.在开始-程序-计算器位置建立快捷方式 ——>nircmd.exe shortcut "f:\winnt\system32\calc.exe" "~$folder.programs$\Calculators" "Windows Calculator" |
36.隐藏桌面窗口 ——>nircmd.exe win hide class progman |
37.显示桌面窗口(先隐藏过) ——>nircmd.exe win show class progman |
38.隐藏系统状态栏的开始菜单 ——>nircmd.exe win child class "Shell_TrayWnd" hide class "button" |
39.显示系统状态栏的开始菜单 ——>nircmd.exe win child class "Shell_TrayWnd" show class "button" |
40.隐藏系统状态栏的时钟 ——>nircmd.exe win child class "Shell_TrayWnd" hide class "TrayClockWClass" |
41.显示系统状态栏的时钟 ——>nircmd.exe win child class "Shell_TrayWnd" show class "TrayClockWClass" |
42.终止所有IE进程 ——>nircmd.exe killprocess iexplore.exe |
43.在桌面建立一个打开k:光驱门的快捷方式 ——>nircmd.exe cmdshortcut "~$folder.desktop$" "Open CDROM" cdrom open k: |
44.在桌面建立 NirSoft 网站的快捷方式 ——>nircmd.exe urlshortcut "http://www.nirsoft.net" "~$folder.desktop$" "NirSoft" |
45.把 NirSoft 网站加入收藏夹. ——>nircmd.exe urlshortcut "http://www.nirsoft.net" "~$folder.favorites$\Links" "NirSoft" |
46.在computers.txt列表中的所有电脑桌面建立 NirSoft 网站的快捷方式 ——>nircmd.exe multiremote copy "c:\temp\computers.txt" urlshortcut "http://www.nirsoft.net" "~$folder.common_desktop$" "NirSoft"
|
47.把显示模式设置为 800x600x24位色 ——>nircmd.exe setdisplay 800 600 24 |
48.在桌面建立把显示模式设置为 800x600x24位色的快捷方式 ——>nircmd.exe cmdshortcut "~$folder.desktop$" "800x600x24" setdisplay 800 600 24 |
49.把桌面上的所有快捷方式复制到(f:\temp\desktop). ——>nircmd.exe execmd copy "~$folder.desktop$\*.lnk" f:\temp\desktop |
50.重启 Apache 服务 ( Windows NT/2000/XP/2003环境下) ——>nircmd.exe service restart apache |
51.在桌面建立重启 Apache 服务的快捷方式——>nircmd.exe cmdshortcut "~$folder.desktop$" "Restart Apache" service restart apache |
52.重启 IIS服务 ——>nircmd.exe service restart w3svc |
53.重启 MySql ——>nircmd.exe service restart MySql |
54.在RegEdit中打开指定的注册表键值 ——>nircmd.exe regedit "HKLM\Software\Microsoft\Windows\CurrentVersion" "CommonFilesDir" |
55.在RegEdit中打开你复制在剪贴板里面的注册表键值 ——>nircmd regedit "~$clipboard$" |
56.取消屏幕保护 ——>nircmd.exe regsetval sz "HKCU\control panel\desktop" "ScreenSaveActive" 0 |
57.开启屏幕保护 ——>nircmd.exe regsetval sz "HKCU\control panel\desktop" "ScreenSaveActive" 1 |
58.使用指定的文件修改日期/时间 (建立或修改时间) ——>nircmd.exe setfiletime "c:\temp\myfile.txt" "24-06-2003 17:57:11" "22-11-2005 10:21:56" |
59.把“桌面”文件夹路径复制到剪贴板 ——>nircmd.exe clipboard set ~$folder.desktop$ |
60.把“开始”菜单文件夹路径复制到剪贴板 ——>nircmd.exe clipboard set ~$folder.start_menu$ |
61.把指定文件“ info1.txt”的内容复制到剪贴板——> nircmd.exe clipboard readfile "c:\My Files\info1.txt" |
62.把剪贴板中的内容保存为“info1.txt”文件 ——>nircmd.exe clipboard addfile "c:\My Files\info1.txt" |
63.清空剪贴板 ——>nircmd.exe clipboard clear |
64.建立 "c:\temp\folders.txt"文件中指定的文件夹. 目录名以 CRLF 分隔. [td]nircmd.exe paramsfile "c:\temp\folders.txt" "" "" execmd md ~$fparam.1$ |
64.从总的.net集cache中安装指定的.NET 集 (比如 gacutil) ——>nircmd.exe gac install "C:\temp\MyAssembly\bin\MyAssembly.dll" |
65.清空所有回收站. ——>nircmd.exe emptybin |
66.在标准windows信息框中回答 'Yes' ——>nircmd.exe dlg "" "" click yes |
打开 J: CD-ROM 驱动器仓门 | nircmd.exe cdrom open j: |
关闭 Y: 驱动器仓门 | nircmd.exe cdrom close y: |
按 2000 单位增大系统音量 (在 65535 的范围内) | nircmd.exe changesysvolume 2000 |
按 5000 单位减小系统音量 (在 65535 的范围内) | nircmd.exe changesysvolume -5000 |
设置音量到最高值 | nircmd.exe setsysvolume 65535 |
系统静音 | nircmd.exe mutesysvolume 1 |
取消系统静音 | nircmd.exe mutesysvolume 0 |
在静音和正常状态间切换系统音量 | nircmd.exe mutesysvolume 2 |
在你的桌面创建一个“在静音和正常状态间切换系统音量”的快捷方式 | nircmd.exe cmdshortcut "~$folder.desktop$" "Switch Volume" mutesysvolume 2 |
关闭监视器 | nircmd.exe monitor off |
启动默认的屏保 | nircmd.exe screensaver |
让计算机处于“待机”模式 | nircmd.exe standby |
注销当前用户 | nircmd.exe exitwin logoff |
重启时询问,如果回答“Yes”,就重启计算机 | nircmd.exe qboxcom "Do you want to reboot ?" "question" exitwin reboot |
关闭计算机 | nircmd.exe exitwin poweroff |
关闭 computers.txt 中指定的所有计算机! | multiremote copy "c:\temp\computers.txt" exitwin poweroff force |
拨号 "My Internet" 连接 | nircmd.exe rasdial "My Internet" |
断开 "My Internet" 连接 | nircmd.exe rashangup "My Internet" |
使你的 Internet Explorer 窗口 75% 透明 ! (192 / 256) | nircmd.exe win trans ititle "internet explorer" 192 |
最小化所有 Internet Explorer 窗口 | nircmd.exe win min class "IEFrame" |
关闭所有 Internet Explorer 窗口 | nircmd.exe win close class "IEFrame" |
关闭所有资源管理器窗口 (我的电脑、文件夹等等) | nircmd.exe win close class "CabinetWClass" |
隐藏所有 Internet Explorer 窗口 | nircmd.exe win hide class "IEFrame" |
显示所有 Internet Explorer 窗口 (在你用先前的例子隐藏它们以后) | nircmd.exe win show class "IEFrame" |
居中所有最上层窗口 | nircmd.exe win center alltop |
移除我的电脑窗口的标题栏 | nircmd.exe win -style title "my computer" 0x00C00000 |
恢复在上个例子中移除的我的电脑窗口的标题栏 | nircmd.exe win +style title "my computer" 0x00C00000 |
Set the My Computer window to right-to-left order (For hebrew and arabic languages) | nircmd win +exstyle title "my computer" 0x00400000 |
Set all child windows of My Computer window to right-to-left order (For hebrew and arabic languages) | nircmd win child title "my computer" +exstyle all 0x00400000 |
在你的桌面创建一个关闭所有 Internet Explorer 窗口的快捷方式 | nircmd.exe cmdshortcut " "~$folder.desktop$ "Close All IE" win close class "IEFrame" |
在你的桌面创建一个隐藏所有 Internet Explorer 窗口的快捷方式 | nircmd.exe cmdshortcut " "~$folder.desktop$ "Hide All IE" win hide class "IEFrame" |
在你的桌面创建一个返回显示所有 Internet Explorer 窗口的快捷方式 | nircmd.exe cmdshortcut " "~$folder.desktop$ "Show All IE" win show class "IEFrame" |
设置 Windows 计算器为最高层窗口 (优先所有其他窗口) | nircmd.exe win settopmost title "Calculator" 1 |
设置 Windows 计算器返回到正常窗口 (非最高层窗口) | nircmd.exe win settopmost title "Calculator" 0 |
创建一个 Windows 计算机的快捷方式到开始菜单->程序->计算器 | nircmd.exe shortcut "f:\winnt\system32\calc.exe" "~$folder.programs$\Calculators" "Windows Calculator" |
隐藏桌面窗口 | nircmd.exe win hide class progman |
显示桌面窗口 (在上一个例子中隐藏它以后) | nircmd.exe win show class progman |
隐藏系统托盘区的开始按钮 | nircmd.exe win child class "Shell_TrayWnd" hide class "button" |
显示系统托盘区的开始按钮 | nircmd.exe win child class "Shell_TrayWnd" show class "button" |
隐藏系统托盘区的时钟 | nircmd.exe win child class "Shell_TrayWnd" hide class "TrayClockWClass" |
显示系统托盘区的时钟 | nircmd.exe win child class "Shell_TrayWnd" show class "TrayClockWClass" |
终止所有 Internet Explorer 进程实例 | nircmd.exe killprocess iexplore.exe |