NirCmd aggiunge un sacco di nuove funzionalità al prompt dei comandi. Puoi aprire e chiudere il cassetto del CD/DVD, spegnere il monitor, modificare la data di un file, etc.
Prodotto dalla NirSoft (già nota per un sacco di altre utility, di cui alcune recensite qui), NirCmd è una piccola utility su riga di comando. Permette di compiere molte operazioni utili con un solo comando. Puoi scrivere o rimuovere chiavi del Registro, scrivere valori nei file INI, collegarti ad una VPN, spegnere/riavviare il PC, creare collegamenti ai file, cambiare la data di un file, cambiare le impostazioni dello schermo o spegnerlo, e tanto altro ancora…
La seguente guida si rivolge a degli utenti (più o meno??) esperti, i quali sanno cosa fare e come comportarsi. Eviterò banali semplificazioni e, soprattutto, declinerò ogni responsabilità da un uso improprio di questi comandi! 😉
Come installare NirCmd
- Scarica NirCmd dal sito ufficiale (trovi i link in fondo al post, dopo la tabella);
- Estrai l’archivio .zip ed avvia NirCmd con privilegi d’amministratore;
- Fai click su Copy to windows directory e conferma con un Sì;
- Ora apri il prompt dei comandi e digita uno dei seguenti comandi qui in basso, forniti dal sito ufficiale.
I comandi che puoi utilizzare
Apri il cassetto del lettore CD/DVD | nircmd.exe cdrom open j: |
Chiudi il cassetto del lettore CD/DVD | nircmd.exe cdrom close y: |
Pronuncia il testo presente negli appunti (Per Windows XP/Vista/7/8/10). | speak text ~$clipboard$ |
Pronuncia il testo contenuto in speak.txt e salvalo in speak.wav (Per Windows XP/Vista/7/8/10). | speak file “c:\temp\speak.txt” 0 100 “c:\temp\speak.wav” 48kHz16BitStereo |
Aumenta il volume di sistema di 2000 unità (su un massimo di 65535) | nircmd.exe changesysvolume 2000 |
Diminuisci il volume di sistema di 5000 unità (su un massimo di 65535) | nircmd.exe changesysvolume -5000 |
Porta il volume al massimo | nircmd.exe setsysvolume 65535 |
Silenzia il volume di sistema | nircmd.exe mutesysvolume 1 |
Togli il silenzioso dal volume di sistema | nircmd.exe mutesysvolume 0 |
Passa dal silenzioso al volume o viceversa a seconda della situazione | nircmd.exe mutesysvolume 2 |
Crea un collegamento sul desktop che passa dal volume al silenzioso o viceversa | nircmd.exe cmdshortcut “~$folder.desktop$” “Switch Volume” mutesysvolume 2 |
Spegni il monitor | nircmd.exe monitor off |
Avvia lo screensaver | nircmd.exe screensaver |
Metti il PC in Standby | nircmd.exe standby |
Disconnetti l’utente | nircmd.exe exitwin logoff |
Riavvia il computer, chiedendo il consenso | nircmd.exe qboxcom “Do you want to reboot ?” “question” exitwin reboot |
Spegni il computer | nircmd.exe exitwin poweroff |
Spegni tutti i computer descritti in C:\temp\computers.txt | multiremote copy “c:\temp\computers.txt” exitwin poweroff force |
Connettiti alla connessione “My Internet” | nircmd.exe rasdial “My Internet” |
Disconnettiti alla connessione “My Internet” | nircmd.exe rashangup “My Internet” |
Rendi internet explorer trasparente al 75%! (192 / 256) | nircmd.exe win trans ititle “internet explorer” 192 |
Minimizza tutte le finestre di Internet Explorer | nircmd.exe win min class “IEFrame” |
Chiudi tutte le finestre di Internet Explorer | nircmd.exe win close class “IEFrame” |
Chiudi tutte le finestre di Esplora Risorse | nircmd.exe win close class “CabinetWClass” |
Nascondi tutte le finestre di Internet Explorer | nircmd.exe win hide class “IEFrame” |
Mostra tutte le finestre di Internet Explorer (se fatto col comando precedente) | nircmd.exe win show class “IEFrame” |
Centra tutte le finestre aperte | 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” |
Imposta la risoluzione dello schermo a 800x600x24bit | nircmd.exe setdisplay 800 600 24 |
Crea un collegamento che imposta la risoluzione dello schermo a 800x600x24bit | 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 |
Riavvia il server Apache (dopo Windows NT/2000/XP/2003) | nircmd.exe service restart apache |
Crea un collegamento sul desktop che riavvia il server Apache | nircmd.exe cmdshortcut “~$folder.desktop$” “Restart Apache” service restart apache |
Riavvia IIS | nircmd.exe service restart w3svc |
Riavvia 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$” |
Disattiva lo Screen Saver | nircmd.exe regsetval sz “HKCU\control panel\desktop” “ScreenSaveActive” 0 |
Attiva lo Screen Sever | nircmd.exe regsetval sz “HKCU\control panel\desktop” “ScreenSaveActive” 1 |
Cambia data e ora di creazione e modifica di un file o una cartella | 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” |
Pulisci gli appunti | 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 |
Ovviamente per questioni di tempo, ho tradotto solo le voci più importanti…
Download
Download | [32 Bit]
Download | [64 Bit]



Blogger e scrittore ventenne nato a Taranto. Collabora con diverse agenzie di marketing digitale e operativo. Ha pubblicato il manuale Windows 10: Guide e Soluzioni e il libro di narrativa storica Cronache di un Palazzo Abbandonato.