[Tools] NirCmd: 免費控制Windows的命令列指令
NirCmd是一套免費的命令列指令,提供許多控制Windows的參數。這些參數太多了,一時還無法歸納如何是最好的運用方法與使用時機,感覺與預設的NET.EXE 有部份功能重疊。
以下是來自其網站的使用範例。
Examples of what you can do with NirCmd
| Open the door of J: CD-ROM drive | nircmd.exe cdrom open j: |
| Close the door of Y: CD-ROM drive | nircmd.exe cdrom close y: |
| Increase the system volume by 2000 units (out of 65535) | nircmd.exe changesysvolume 2000 |
| Decrease the system volume by 5000 units (out of 65535) | nircmd.exe changesysvolume -5000 |
| Set the volume to the highest value | nircmd.exe setsysvolume 65535 |
| Mute the system volume | nircmd.exe mutesysvolume 1 |
| Unmute the system volume | nircmd.exe mutesysvolume 0 |
| Switch the system volume between the mute and normal state. | nircmd.exe mutesysvolume 2 |
| Create a shortcut on your desktop that switch the system volume between the mute and normal state. | nircmd.exe cmdshortcut “~$folder.desktop$” “Switch Volume” mutesysvolume 2 |
| Turn off the monitor | nircmd.exe monitor off |
| Start the default screen saver | nircmd.exe screensaver |
| Put your computer in ‘standby’ mode | nircmd.exe standby |
| log off the current user | nircmd.exe exitwin logoff |
| Ask if you want to reboot, and if you answer ‘Yes’, reboot the computer. | nircmd.exe qboxcom “Do you want to reboot ?” “question” exitwin reboot |
| Turn off your computer | nircmd.exe exitwin poweroff |
| Turn off all computers specified in computers.txt ! | multiremote copy “c:tempcomputers.txt” exitwin poweroff force |
| Dial to “My Internet” connection | nircmd.exe rasdial “My Internet” |
| Disconnect the “My Internet” connection | nircmd.exe rashangup “My Internet” |
| Make your Internet Explorer windows 75% transparent ! (192 / 256) | nircmd.exe win trans ititle “internet explorer” 192 |
| Minimize all your Internet Explorer windows | nircmd.exe win min class “IEFrame” |
| Close all your Internet Explorer windows | nircmd.exe win close class “IEFrame” |
| Close all your Explorer windows (My Computer, folders, and so on) | nircmd.exe win close class “CabinetWClass” |
| Hide all your Internet Explorer windows | nircmd.exe win hide class “IEFrame” |
| Show all your Internet Explorer windows (after you made them hidden with previous example) | nircmd.exe win show class “IEFrame” |
| Center all top-level windows | nircmd.exe win center alltop |
| Remove the title bar of My Computer window. | nircmd.exe win -style title “my computer” 0x00C00000 |
| Return the title bar of My Computer window that we removed in the previous example. | 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” 0×00400000 |
| 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 0×00400000 |
| Create a shortcut on your desktop that closes all your Internet Explorer windows | 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 | 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 | nircmd.exe cmdshortcut ” “~$folder.desktop$ “Show All IE” win show class “IEFrame” |
| Set the Windows Calculator as top-most window (above all other windows) | nircmd.exe win settopmost title “Calculator” 1 |
| Set the Windows Calculator back to regular window (non top-most window) | nircmd.exe win settopmost title “Calculator” 0 |
| Create a shortcut to Windows calculator under Start Menu->Programs->Calculators | nircmd.exe shortcut “f:winntsystem32calc.exe” “~$folder.programs$Calculators” “Windows Calculator” |
| Hide the desktop window | nircmd.exe win hide class progman |
| Show the desktop window (After hiding it in previous example) | nircmd.exe win show class progman |
| Hide the start button on the system tray | nircmd.exe win child class “Shell_TrayWnd” hide class “button” |
| Show the start button on the system tray | nircmd.exe win child class “Shell_TrayWnd” show class “button” |
| Hide the clock on the system tray | nircmd.exe win child class “Shell_TrayWnd” hide class “TrayClockWClass” |
| Show the clock on the system tray | nircmd.exe win child class “Shell_TrayWnd” show class “TrayClockWClass” |
| Kill (terminate) all instance of Internet Explorer processes | nircmd.exe killprocess iexplore.exe |
| Create a shortcut on your desktop that opens the door of K: CDROM drive when you run it. | nircmd.exe cmdshortcut “~$folder.desktop$” “Open CDROM” cdrom open k: |
| Create a shortcut to NirSoft Web site on your desktop | nircmd.exe urlshortcut “http://www.nirsoft.net” “~$folder.desktop$” “NirSoft” |
| Add NirSoft Web site to your Favorities under Links folder. | 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 | nircmd.exe multiremote copy “c:tempcomputers.txt” urlshortcut “http://www.nirsoft.net” “~$folder.common_desktop$” “NirSoft” |
| Set the display mode to 800x600x24bit colors | nircmd.exe setdisplay 800 600 24 |
| Create a shortcut on the desktop that set the display mode to 800x600x24bit colors | nircmd.exe cmdshortcut “~$folder.desktop$” "800x600x24″ setdisplay 800 600 24 |
| Copy all shortcuts on your desktop to another folder (f:tempdesktop). | nircmd.exe execmd copy “~$folder.desktop$*.lnk” f:tempdesktop |
| Restart your Apache server (under Windows NT/2000/XP/2003) | nircmd.exe service restart apache |
| Create a shortcut on your desktop that restarts the Apache server | nircmd.exe cmdshortcut “~$folder.desktop$” "Restart Apache” service restart apache |
| Restart your IIS | nircmd.exe service restart w3svc |
| Restart MySql | nircmd.exe service restart MySql |
| Open the desired Registry key/v alue in RegEdit |
nircmd.exe regedit “HKLMSoftwareMicrosoftWindowsCurrentVersion” “CommonFilesDir” |
| Open the Registry key that you copied to the clipboard in RegEdit. | nircmd regedit “~$clipboard$” |
| Disable the screen saver | nircmd.exe regsetval sz “HKCUcontrol paneldesktop” “ScreenSaveActive” 0 |
| Disable the screen saver | nircmd.exe regsetval sz “HKCUcontrol paneldesktop” “ScreenSaveActive” 0 |
| Change the date/time of the specified filename (creation time and modified time) | nircmd.exe setfiletime “c:tempmyfile.txt” “24-06-2003 17:57:11″ “22-11-2005 10:21:56″ |
| Copy your desktop folder path to the clipboard | nircmd.exe clipboard set ~$folder.desktop$ |
| Copy your start menu folder path to the clipboard | nircmd.exe clipboard set ~$folder.start_menu$ |
| Copy the content of info1.txt (simple text file) to the clipboard | nircmd.exe clipboard file “c:My Filesinfo1.txt” |
| Clear the clipboard | nircmd.exe clipboard clear |
| Create all folders specified in “c:tempfolders.txt”. The folder path names are separated by CRLF characters. | nircmd.exe paramsfile “c:tempfolders.txt” “” “” execmd md ~$fparam.1$ |
| Install the specified .NET assembly in the global assembly cache (like gacutil) | nircmd.exe gac install “C:tempMyAssemblybinMyAssembly.dll” |
##
相關文章
撰寫留言
隨機文章
本日點擊排行
本周點擊排行
本月點擊排行
歷史點擊排行 |
統計表
- [WM6] 自動再次提醒未接來電等事件:ReRemind (3 人次, 2009-04-19)
- 用DeskView讓桌面變清爽 (3 人次, 2008-01-24)
- [轉貼] 利用Wood Workshop自製木頭質感的底圖素材 (3 人次, 2005-06-14)
- 接聽電話後重新顯示螢幕的偵測軟體:Touch InCall Screen Tweak (3 人次, 2009-03-12)
- 搖手機啟動指定的程式:G-Trigger (2 人次, 2009-03-19)
- 又一個Java寫的資料庫前端工具:Execute Query 3.0 (2 人次, 2006-09-21)
- OpenOffice.org擴充的集中站 (2 人次, 2008-01-31)
- Xuite網址的正規運算式測試 (2 人次, 2007-04-30)
- [Tools] 為硬碟做健康檢查:HDDlife; 硬碟測試:HD_Speed、HD Tune (2 人次, 2005-03-18)
- 語系/地區碼 zh-TW與zh-CN 中的zh代表什麼? (2 人次, 2005-06-07)
- 能在HD手機上順暢運行的3D賽車+射擊遊戲:Xtrackt (2 人次, 2009-09-12)
- Linus談Git與TortoiseGit (2 人次, 2008-12-19)
- 如何組成強固又容易記憶的密碼? (2 人次, 2009-01-07)
- [工具] Xuite人氣統計網頁 (2 人次, 2007-09-16)
- [轉貼] 全球掀熱潮 桃太郎最愛玩部落格 (2 人次, 2007-04-09)
- ls -d 的用途 (2 人次, 2004-12-26)
- [Xuite] 文章分類後面的小圖示代表什麼意義? (2 人次, 2005-03-16)
- [NetBeans] 安裝與設定NetBeans內的Subversion (2 人次, 2006-01-21)
- [轉貼] Me Media——個人媒體時代來臨! (2 人次, 2005-04-10)
- (2 人次, 2004-12-15)
- 能與Google Reader同步的Windows Mobile RSS reader? (2 人次, 2009-03-09)
- [轉貼] 千千靜聽:自動抓歌詞+詞曲同步的KTV播放器 (2 人次, 2005-07-22)
- Windows Mobile使用的完美聯絡人軟體:Inesoft Phone [修訂] (2 人次, 2009-02-28)
- [Blog] 刪除del.icio.us的張貼網站 (2 人次, 2005-03-05)
- Spb Mobile Shell設定備忘 (2 人次, 2009-02-19)
- 將圖片批次加入浮水印的工具:TSR Watermark Image Software (2 人次, 2010-06-06)
- 用樣式控制Google AdSense廣告顯示的位置 (2 人次, 2007-05-03)
- [Tools] 快速搜尋檔案:Locate32 (2 人次, 2005-07-16)
- 用tag2find幫你的文件隨處貼標籤 (2 人次, 2008-01-11)
- WordPress持續減肥-找出使用網站內部圖檔的文章 (2 人次, 2010-06-12)
- [創作] 字型工具產生器:動態變更Blog網頁的字型大小 (2 人次, 2007-04-29)
- 讓手機永保清醒的DontSleep Wifi (2 人次, 2009-03-13)
- 關閉所有視窗的小工具:CloseAll.exe (2 人次, 2010-05-22)
- WordPress減肥記:壓縮JavaScript檔的大小 (2 人次, 2010-06-08)
- 用反垃圾郵件代理程式Anti-Spam SMTP Proxy (ASSP)清除惱人的垃圾信 (2 人次, 2010-05-23)
- 常見的收錄書籤網址寫法之彙總表格 V1.1 (2 人次, 2007-04-01)
- [SVN] Hook scripts的使用方法 (2 人次, 2005-12-09)
- WordPress 3.0與PHP 5的時區問題 (2 人次, 2010-06-24)
- 在Blog裡顯示隨機文章的簡單作法 (2 人次, 2007-10-14)
- WinMerge檔案濾鏡的使用方法 (2 人次, 2006-09-10)
- [OOo] 增加插入按鈕到標準工具列 (2 人次, 2005-08-14)
- [Subversion] 尋找Subversion Client工具 (2 人次, 2005-09-01)
- [轉貼Toget] iColorfolder:為資料夾圖示換上繽紛色彩 (2 人次, 2005-08-09)
- 用cPanel Proxy穿透防火牆以操作網站cPanel後台 (2 人次, 2010-06-21)
- 使用QNAP TS-109 NAS設備的心得 (1 人次, 2007-10-18)
- [創作] 個人網頁全都連:Show Yourself Generator V1.0 (1 人次, 2007-04-21)
- 加入兔斯基表情圖形的網頁 (1 人次, 2008-01-16)
- TiddlyWiki: 增加第二組編輯區工具列 (1 人次, 2007-08-15)
- 改造你的Gmail: Better Gmail 0.3 (FireFox extension) (1 人次, 2007-04-23)
- Xuite存檔失敗的小小問題 (1 人次, 2008-03-26)







最新留言