<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" 
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>[Tools] NirCmd: 免費控制Windows的命令列指令</title>
<link>http://blog.roodo.com/emisjerry/archives/373785.html/</link>
<description><![CDATA[
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 &quot;~$folder.desktop$&quot; &quot;Switch Volume&quot; 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 &quot;Do you want to
reboot ?&quot; &quot;question&quot; exitwin reboot




Turn off your computer

nircmd.exe exitwin poweroff 



Turn off all computers specified in computers.txt !

multiremote copy
&quot;c:\temp\computers.txt&quot; exitwin poweroff force 


Dial to &quot;My Internet&quot;
connection 
nircmd.exe rasdial &quot;My Internet&quot;



Disconnect the &quot;My
Internet&quot; connection 
nircmd.exe rashangup &quot;My Internet&quot;



Make your Internet
Explorer windows 75% transparent ! (192 / 256)

nircmd.exe win trans ititle &quot;internet
explorer&quot; 192



Minimize all your
Internet Explorer windows 
nircmd.exe win min class &quot;IEFrame&quot; 


Close all your Internet
Explorer windows 
nircmd.exe win close class &quot;IEFrame&quot; 


Close all your Explorer
windows (My Computer, folders, and so on)

nircmd.exe win close class
&quot;CabinetWClass&quot;



Hide all your Internet
Explorer windows 
nircmd.exe win hide class &quot;IEFrame&quot; 


Show all your Internet
Explorer windows (after you made them hidden with previous example)

nircmd.exe win show class &quot;IEFrame&quot; 


Center all top-level
windows

nircmd.exe win center alltop



Remove the title bar of
My Computer window.

nircmd.exe win -style title &quot;my
computer&quot; 0x00C00000



Return the title bar of
My Computer window that we removed in the previous example.

nircmd.exe win +style title &quot;my
computer&quot; 0x00C00000



Set the My Computer
window to right-to-left order (For hebrew and arabic languages)

nircmd win +exstyle title &quot;my
computer&quot; 0x00400000



Set all child windows of
My Computer window to right-to-left order (For hebrew and arabic
languages)

nircmd win child title &quot;my computer&quot;
+exstyle all 0x00400000



Create a shortcut on
your desktop that closes all your Internet Explorer windows 
nircmd.exe
cmdshortcut &quot; &quot;~$folder.desktop$ &quot;Close All IE&quot; win close class
&quot;IEFrame&quot; 


Create a shortcut on
your desktop that hides all your Internet Explorer windows 
nircmd.exe
cmdshortcut &quot; &quot;~$folder.desktop$ &quot;Hide All IE&quot; win hide class &quot;IEFrame&quot;



Create a shortcut on
your desktop that shows back all your Internet Explorer windows 
nircmd.exe
cmdshortcut &quot; &quot;~$folder.desktop$ &quot;Show All IE&quot; win show class &quot;IEFrame&quot;



Set the Windows
Calculator as top-most window (above all other windows)

nircmd.exe win settopmost title
&quot;Calculator&quot; 1



Set the Windows
Calculator back to regular window (non top-most window)

nircmd.exe win settopmost title
&quot;Calculator&quot; 0



Create a shortcut to
Windows calculator under Start
Menu-&gt;Programs-&gt;Calculators 
nircmd.exe
shortcut &quot;f:\winnt\system32\calc.exe&quot; &quot;~$folder.programs$\Calculators&quot;
&quot;Windows Calculator&quot; 


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
&quot;Shell_TrayWnd&quot; hide class &quot;button&quot;



Show the start button on
the system tray

nircmd.exe win child class
&quot;Shell_TrayWnd&quot; show class &quot;button&quot;



Hide the clock on the
system tray

nircmd.exe win child class
&quot;Shell_TrayWnd&quot; hide class &quot;TrayClockWClass&quot;



Show the clock on the
system tray

nircmd.exe win child class
&quot;Shell_TrayWnd&quot; show class &quot;TrayClockWClass&quot; 


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 &quot;~$folder.desktop$&quot; &quot;Open CDROM&quot; cdrom open k:



Create a shortcut to
NirSoft Web site on your desktop

nircmd.exe urlshortcut
&quot;http://www.nirsoft.net&quot; &quot;~$folder.desktop$&quot; &quot;NirSoft&quot;



Add NirSoft Web site to
your Favorities under Links folder.

nircmd.exe
urlshortcut &quot;http://www.nirsoft.net&quot; &quot;~$folder.favorites$\Links&quot;
&quot;NirSoft&quot;



Create a shortcut to
NirSoft Web site on the desktop of all computers listed in
computers.txt

nircmd.exe
multiremote copy &quot;c:\temp\computers.txt&quot; urlshortcut
&quot;http://www.nirsoft.net&quot; &quot;~$folder.common_desktop$&quot; &quot;NirSoft&quot;



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 &quot;~$folder.desktop$&quot; &amp;quot800x600x24&quot; setdisplay 800
600 24



Copy all shortcuts on
your desktop to another folder (f:\temp\desktop).

nircmd.exe
execmd copy &quot;~$folder.desktop$\*.lnk&quot; f:\temp\desktop 


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 &quot;~$folder.desktop$&quot; &amp;quotRestart Apache&quot; service
restart apache



Restart your IIS

nircmd.exe service restart w3svc 


Restart MySql

nircmd.exe service restart MySql 


Open the desired
Registry key/value in RegEdit

nircmd.exe
regedit &quot;HKLM\Software\Microsoft\Windows\CurrentVersion&quot;
&quot;CommonFilesDir&quot;



Open the Registry key
that you copied to the clipboard in RegEdit.

nircmd
regedit &quot;~$clipboard$&quot;



Disable the screen saver

nircmd.exe regsetval sz &quot;HKCU\control
panel\desktop&quot; &quot;ScreenSaveActive&quot; 0



Disable the screen saver

nircmd.exe regsetval sz &quot;HKCU\control
panel\desktop&quot; &quot;ScreenSaveActive&quot; 0



Change the date/time of
the specified filename (creation time and modified time)

nircmd.exe
setfiletime &quot;c:\temp\myfile.txt&quot; &quot;24-06-2003 17:57:11&quot; &quot;22-11-2005
10:21:56&quot; 


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 &quot;c:\My Files\info1.txt&quot;



Clear the clipboard

nircmd.exe
clipboard clear



Create all folders
specified in &quot;c:\temp\folders.txt&quot;. The folder path names are
separated by CRLF characters.

nircmd.exe
paramsfile &quot;c:\temp\folders.txt&quot; &quot;&quot; &quot;&quot; execmd md ~$fparam.1$



Install the specified
.NET assembly in the global assembly cache (like gacutil)

nircmd.exe
gac install &quot;C:\temp\MyAssembly\bin\MyAssembly.dll&quot;






##]]>
	</description>
<language>zh-tw</language>
<generator>Roodo Blog System</generator>
<copyright>All Rights Reserved</copyright>
<atom:link href="http://blog.roodo.com/emisjerry/archives/373785-comment.xml" rel="self" type="application/rss+xml" />
<item>
	<title>回應：[Tools] NirCmd: 免費控制Windows的命令列指令</title>
	<description><![CDATA[good]]>
	</description>
	<link>http://blog.roodo.com/emisjerry/archives/373785.html</link>
	<guid>http://blog.roodo.com/emisjerry/archives/373785.html#comment-19321203</guid>
	<author>rickle99@yahoo.com.hk(rickle99)</author>	<category>文章回應</category>
	<pubDate>Tue, 09 Jun 2009 20:29:54 +0800</pubDate>
</item>
</channel>
</rss>