NirCmd of win: introduction, installation and usage of NirCmd
A Virgo program ape 2021-07-23 09:17:54

Win And NirCmd:NirCmd An introduction to the 、 install 、 A detailed introduction to how to use

 

Catalog

NirCmd An introduction to the

NirCmd Installation

NirCmd How to use


 

 

 

NirCmd An introduction to the

       NIrCMD Is a small command line utility , Allows you to perform some useful tasks without displaying any user interface . Run by using simple command line options NIMRCD, You can write and delete values and keys in the registry , Write value to INI file , Dial to Internet Account or connect to *** The Internet , Restart Windows Or turn off the computer , Create a file shortcut , Change to create / modification date . A file , Change your display settings , Turn off your monitor , Open your CD-ROM The door of the drive , And more …
NirCmd v2.81 Official website

 

 

NirCmd Installation

Download NirLauncher Package

 

 

 

NirCmd How to use

for example :nircmd setdefaultsounddevice

Eject drive letter as J My CD-ROM     

NirCmd.exe cdrom open j:

The drive letter is Y My CD-ROM

nircmd.exe cdrom close y:

increase 2000 Four units of system volume ( Maximum 65535)

nircmd.exe changesysvolume 2000

Reduce 5000 Four units of system volume ( Maximum 65535)

nircmd.exe changesysvolume -5000

Set to maximum volume

nircmd.exe setsysvolume 65535

Set to mute

nircmd.exe mutesysvolume 1

Unmute

nircmd.exe mutesysvolume 0

Switch between mute and normal

nircmd.exe mutesysvolume 2

Create a shortcut to the command to switch between mute and normal state on the desktop

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

Enter standby mode

nircmd.exe standby

Logout the current user

nircmd.exe exitwin logoff

Pop-up dialog box , Ask if you want to restart . Select Yes to restart the computer

nircmd.exe qboxcom "Do you want to reboot?" "question" exitwin reboot

close computers.txt All computers specified in

multiremote copy "c:\temp\computers.txt" exitwin poweroff force

Dial up connection to "My Internet"

nircmd.exe rashangup "My Internet"

Set up IE The window is 75% transparency (192/256)

nircmd.exe win trans ititle "internet explorer" 192

Minimize all IE window

nircmd.exe win min class "IEFrame"

Close all IE window

nircmd.exe win close class "IEFrame"

Close all Explorer windows ( My computer 、 Folder etc. )

nircmd.exe win close class "CabinetWClass"

Hide all IE window

nircmd.exe win hide class "IEFrame"

Show all IE window ( After hiding with the above command )

nircmd.exe win show class "IEFrame"

Center all the top windows

nircmd.exe win center alltop

Remove the title bar from my computer window

nircmd.exe win -style title "my computer" 0x00C0000

Restore the title bar of my computer window ( When removed with the above command )

nircmd.exe win +style title "my computer" 0x00C0000

Set my computer windows in right to left order ( For Hebrew and Arabic )

nircmd.exe win +exstyle title "my computer" 0x00400000

Set all the subwindows of my computer window in right to left order ( The application is the same as above )

nircmd.exe win child title "my computer" +exstyle all 0x00400000

Create on the desktop to turn off all IE Shortcuts to Windows

nircmd.exe cmdshortcut " "~$folder.desktop$ "Close All IE" win close class "IEFrame"

Create on the desktop to hide all IE Shortcuts to Windows

nircmd.exe cmdshortcut " "~$folder.desktop$ "Hide All IE" win hide class "IEFrame"

Create on the desktop to display all of them again IE Shortcuts to Windows

nircmd.exe cmdshortcut " "~$folder.desktop$ "Show All IE" win show class "IEFrame"

hold calculator The window is set to the top window ( On top of the other windows )

nircmd.exe win settopmost title "Calculator" 1

recovery calculator The window is in the original window state ( Not at the top )

nircmd.exe win settopmost title "Calculator" 0

establish calc.exe Shortcut to start menu -> Program ->Calculators

nircmd.exe shortcut "f:\winnt\system32\calc.exe" "~$folder.programs$\Calculators" "Windows Calculator"

Hide all desktop icons

nircmd.exe win hide class progman

Show all desktop icons ( After hiding with the above command )

nircmd.exe win show class progman

Hide the system start button

nircmd.exe win child class "Shell_TrayWnd" hide class "button"

Display the system start button

nircmd.exe win child class "Shell_TrayWnd" show class "button"

Hide system time

nircmd.exe win child class "Shell_TrayWnd" hide class "TrayClockWClass"

Display system time

nircmd.exe win child class "Shell_TrayWnd" show class "TrayClockWClass"

Terminate all IE example

nircmd.exe killprocess iexplore.exe

Create a desktop shortcut , Run to eject the CD-ROM drive (K disc )

nircmd.exe cmdshortcut "~$folder.desktop$" "Open CDROM" cdrom open k:

take nirsoft URL creation to desktop shortcut

nircmd.exe urlshortcut "http://www.nirsoft.net" "~$folder.desktop$" "NirSoft"

add to nirsoft URL to favorites \ Under the link

nircmd.exe urlshortcut "http://www.nirsoft.net" "~$folder.favorites$\Links" "NirSoft"

take nirsoft URL shortcut created to computers.txt Desktop of all computers listed in

nircmd.exe multiremote copy "c:\temp\computers.txt" urlshortcut "http://www.nirsoft.net" "~$folder.common_desktop$" "NirSoft"

Set the display mode to 800X600,24 A color

nircmd.exe setdisplay 800 600 24

Set the display mode to 800X600,24 Bit color commands are created as desktop shortcuts

nircmd.exe cmdshortcut "~$folder.desktop$" "800x600x24" setdisplay 800 600 24

Copy all desktop shortcuts to other folders (f:\temp\desktop)

nircmd.exe execmd copy "~$folder.desktop$\*.lnk" f:\temp\desktop

Restart your Apache server The server (windows NT/2000/XP/2003)

nircmd.exe service restart apache

Will restart Apache server Server commands are created as desktop shortcuts

nircmd.exe cmdshortcut "~$folder.desktop$" "Restart Apache" service restart apache

restart IIS( Internet Information Service )

nircmd.exe service restart w3svc

restart MySql

nircmd.exe service restart MySql

Open the specified registry key / value

nircmd.exe regedit "HKLM\Software\Microsoft\Windows\CurrentVersion" "CommonFilesDir"

Open the registry key you copied to the clipboard in the registry editor

nircmd regedit "~$clipboard$"

Disable screen saver

nircmd.exe regsetval sz "HKCU\control panel\desktop" "ScreenSaveActive" 0

Disable the screen saver

nircmd.exe regsetval sz "HKCU\control panel\desktop" "ScreenSaveActive" 1

Change the date of the specified file / Time ( Creation time and modification time )

nircmd.exe setfiletime "c:\temp\myfile.txt" "24-06-2003 17:57:11" "22-11-2005 10:21:56"

Copy the path of the desktop to the clipboard

nircmd.exe clipboard set ~$folder.desktop$

Copy the start menu folder path to the clipboard

nircmd.exe clipboard set ~$folder.start_menu$

Copy text info1.txt To the clipboard

nircmd.exe clipboard readfile "c:\My Files\info1.txt"

Add the contents of the clipboard to the text info1.txt in

nircmd.exe clipboard addfile "c:\My Files\info1.txt"

Clear shear plate

nircmd.exe clipboard clear

Create all in "c:\temp\folders.txt" The folder specified in , Folder pathnames are separated by carriage returns

nircmd.exe paramsfile "c:\temp\folders.txt" "" "" execmd md ~$fparam.1$

Install all in the global assembly cache (GAC) Specified in the .NET Assembly

nircmd.exe gac install "C:\temp\MyAssembly\bin\MyAssembly.dll"

Empty the recycle bin on all disks

nircmd.exe emptybin

To a standard Windows Message box reply confirmation

nircmd.exe dlg "" "" click yes

Delay 2 Second , Then save the current screenshot to shot.png

nircmd.exe cmdwait 2000 savescreenshot "f:\temp\shot.png"

 

 

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:
Speaks the text currently in the clipboard (For Windows XP/Vista/7/8). speak text ~$clipboard$
Speaks the text stored inside speak.txt into speak.wav filename (For Windows XP/Vista/7/8). speak file "c:\temp\speak.txt" 0 100 "c:\temp\speak.wav" 48kHz16BitStereo
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:\temp\computers.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" 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
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:\winnt\system32\calc.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:\temp\computers.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:\temp\desktop). nircmd.exe execmd copy "~$folder.desktop$\*.lnk" 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 "~$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/value in RegEdit nircmd.exe regedit "HKLM\Software\Microsoft\Windows\CurrentVersion" "CommonFilesDir"
Open the Registry key that you copied to the clipboard in RegEdit. nircmd regedit "~$clipboard$"
Disable the screen saver nircmd.exe regsetval sz "HKCU\control panel\desktop" "ScreenSaveActive" 0
Enable the screen saver nircmd.exe regsetval sz "HKCU\control panel\desktop" "ScreenSaveActive" 1
Change the date/time of the specified filename (creation time and modified time) 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 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 readfile "c:\My Files\info1.txt"
Add the text content of clipboard to info1.txt nircmd.exe clipboard addfile "c:\My Files\info1.txt"
Clear the clipboard nircmd.exe clipboard clear
Create all folders specified in "c:\temp\folders.txt". The folder path names are separated by CRLF characters. nircmd.exe paramsfile "c:\temp\folders.txt" "" "" execmd md ~$fparam.1$
Install the specified .NET assembly in the global assembly cache (like gacutil) nircmd.exe gac install "C:\temp\MyAssembly\bin\MyAssembly.dll"
Empty the recycle bin in all drives. nircmd.exe emptybin
Answer 'Yes' to a standard Windows message-box. nircmd.exe dlg "" "" click yes
Wait 2 seconds, and then save the current screen to shot.png nircmd.exe cmdwait 2000 savescreenshot "f:\temp\shot.png"
Save 10 screenshots in a loop, and wait 60 seconds between the screenshot save calls. The filenames of the screenshot will contain the time and date of the saved screenshot. nircmd.exe loop 10 60000 savescreenshot c:\temp\scr~$currdate.MM_dd_yyyy$-~$currtime.HH_mm_ss$.png
Wait until Firefox is closed, and then say "Firefox was closed" nircmd.exe waitprocess firefox.exe speak text "Firefox was closed"
Run RegEdit with SYSTEM user (On Windows 7/8/Vista/2008), which allows you to view all hidden system Registry keys nircmd.exe elevatecmd runassystem c:\windows\regedit.exe

 

 

Related articles
NirCmd Introduce
Command line tools (nircmd.exe) How to use

 

Please bring the original link to reprint ,thank
Similar articles

2021-06-05

2021-06-05

2021-06-06

2021-06-09

2021-06-09

2021-06-09

2021-06-09

2021-06-10

2021-06-11

2021-06-13

2021-06-13

2021-06-15