Comprehensive List of NirCmd Commands with Descriptions - Printable Version +- WildlandsTech (https://wildlandstech.com) +-- Forum: Programming (https://wildlandstech.com/forumdisplay.php?fid=3) +--- Forum: Batch & Shell Scripting (https://wildlandstech.com/forumdisplay.php?fid=42) +--- Thread: Comprehensive List of NirCmd Commands with Descriptions (/showthread.php?tid=140) |
Comprehensive List of NirCmd Commands with Descriptions - Sneakyone - 09-03-2024 Comprehensive List of NirCmd Commands with Descriptions NirCmd is a versatile command-line tool that enables you to automate a wide range of system tasks. Below is a comprehensive list of NirCmd commands with descriptions and examples. 1. mutesysvolume Description: Mutes or unmutes the system volume. Code: nircmd.exe mutesysvolume 1 ; Mutes the system volume 2. changesysvolume Description: Changes the system volume by a specified amount. Code: nircmd.exe changesysvolume 5000 ; Increases the volume 3. setsysvolume Description: Sets the system volume to a specific level. Code: nircmd.exe setsysvolume 65535 ; Sets volume to maximum 4. setbrightness Description: Sets the screen brightness to a specific level. Code: nircmd.exe setbrightness 50 ; Sets brightness to 50% 5. monitor Description: Turns the monitor on, off, or puts it into low-power mode. Code: nircmd.exe monitor off ; Turns the monitor off 6. screensaver Description: Starts the screensaver. Code: nircmd.exe screensaver 7. lockws Description: Locks the workstation (equivalent to pressing Win+L). Code: nircmd.exe lockws 8. exitwin Description: Shuts down, restarts, logs off, or locks the computer. Code: nircmd.exe exitwin poweroff ; Shuts down the computer 9. clipboard Description: Manipulates the clipboard content. Code: nircmd.exe clipboard saveclip "C:\path\to\clipboard.txt" ; Saves clipboard content to a text file 10. setdefaultsounddevice Description: Sets the default sound device. Code: nircmd.exe setdefaultsounddevice "Speakers" ; Sets "Speakers" as the default sound device 11. win Description: Manipulates windows (minimize, maximize, close, etc.). Code: nircmd.exe win close title "Untitled - Notepad" ; Closes the Notepad window with the title "Untitled - Notepad" 12. elevatecmd Description: Runs a command with elevated privileges (Administrator). Code: nircmd.exe elevatecmd exec hide "cmd.exe" "/c echo Hello, World!" 13. loop Description: Repeats a command multiple times with a specified delay between each repetition. Code: nircmd.exe loop 10 1000 beep ; Beeps 10 times with a 1-second delay between each beep 14. speak Description: Converts text to speech and plays it through the speakers. Code: nircmd.exe speak text "Hello, this is NirCmd speaking." 15. beep Description: Generates a beep sound. Code: nircmd.exe beep 750 300 ; Beeps at 750 Hz for 300 milliseconds 16. savescreenshot Description: Captures a screenshot and saves it as an image file. Code: nircmd.exe savescreenshot "C:\path\to\screenshot.png" 17. setcursor Description: Sets the mouse cursor position on the screen. Code: nircmd.exe setcursor 500 300 ; Moves the cursor to the coordinates (500, 300) 18. sendkey Description: Simulates a key press. Code: nircmd.exe sendkey ctrl+alt+del press ; Simulates pressing Ctrl+Alt+Del 19. waitprocess Description: Waits until a specified process is terminated. Code: nircmd.exe waitprocess notepad.exe 20. elevate Description: Runs a command with elevated privileges (Administrator) without showing a UAC prompt. Code: nircmd.exe elevate setvol master 65535 ; Sets the master volume to maximum with elevated privileges 21. hideapp Description: Hides or shows an application window. Code: nircmd.exe hideapp hide process notepad.exe ; Hides all Notepad windows 22. execmd Description: Executes a command line in a hidden window. Code: nircmd.exe execmd cmd /c echo Hello, World! > C:\path\to\output.txt 23. regedit Description: Executes a .reg file to import or export registry settings. Code: nircmd.exe regedit "C:\path\to\file.reg" ; Executes the specified .reg file 24. net Description: Executes network-related commands (similar to Windows `net` command). Code: nircmd.exe net start "ServiceName" ; Starts a Windows service 25. wait Description: Pauses execution for a specified number of milliseconds. Code: nircmd.exe wait 5000 ; Waits for 5 seconds Conclusion NirCmd is a powerful tool for automating and controlling various aspects of the Windows operating system. By mastering these commands, you can create scripts to perform tasks ranging from |