NIRCMD, comandos para manejar windows

Coman­dos extraí­dos de http://www.nirsoft.net/utils/nircmd.html

NIRCMD (32 bits)

NIRCMD (64 bits)

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 cur­rent­ly in the clip­board (For Win­dows XP and Vista). speak text ~$clip­board$
Increase the sys­tem vol­ume by 2000 units (out of 65535) nircmd.exe changesysvol­ume 2000
Decrease the sys­tem vol­ume by 5000 units (out of 65535) nircmd.exe changesysvol­ume ‑5000
Set the vol­ume to the high­est value nircmd.exe set­sysvol­ume 65535
Mute the sys­tem volume nircmd.exe mutesysvol­ume 1
Unmute the sys­tem volume nircmd.exe mutesysvol­ume 0
Switch the sys­tem vol­ume between the mute and nor­mal state. nircmd.exe mutesysvol­ume 2
Cre­ate a short­cut on your desk­top that switch the sys­tem vol­ume between the mute and nor­mal state. nircmd.exe cmd­short­cut "~$folder.desktop$" "Switch Vol­ume" mutesysvol­ume 2
Turn off the monitor nircmd.exe mon­i­tor off
Start the default screen saver nircmd.exe screen­saver
Put your com­put­er in 'stand­by' mode nircmd.exe stand­by
log off the cur­rent user nircmd.exe exitwin logoff
Ask if you want to reboot, and if you answer 'Yes', reboot the computer. nircmd.exe qbox­com "Do you want to reboot ?" "ques­tion" exitwin reboot
Turn off your computer nircmd.exe exitwin poweroff
Turn off all com­put­ers spec­i­fied in computers.txt ! mul­ti­re­mote copy "c:tempcomputers.txt" exitwin poweroff force
Dial to "My Inter­net" connection nircmd.exe ras­di­al "My Internet"
Dis­con­nect the "My Inter­net" connection nircmd.exe rashangup "My Internet"
Make your Inter­net Explor­er win­dows 75% trans­par­ent ! (192 / 256) nircmd.exe win trans iti­tle "inter­net explor­er" 192
Min­i­mize all your Inter­net Explor­er windows nircmd.exe win min class "IEFrame"
Close all your Inter­net Explor­er windows nircmd.exe win close class "IEFrame"
Close all your Explor­er win­dows (My Com­put­er, fold­ers, and so on) nircmd.exe win close class "Cab­i­netWClass"
Hide all your Inter­net Explor­er windows nircmd.exe win hide class "IEFrame"
Show all your Inter­net Explor­er win­dows (after you made them hid­den with pre­vi­ous example) nircmd.exe win show class "IEFrame"
Cen­ter all top-lev­el windows nircmd.exe win cen­ter alltop
Remove the title bar of My Com­put­er window. nircmd.exe win ‑style title "my com­put­er" 0x00C00000
Return the title bar of My Com­put­er win­dow that we removed in the pre­vi­ous example. nircmd.exe win +style title "my com­put­er" 0x00C00000
Set the My Com­put­er win­dow to right-to-left order (For hebrew and ara­bic languages) nir­cmd win +exstyle title "my com­put­er" 0x00400000
Set all child win­dows of My Com­put­er win­dow to right-to-left order (For hebrew and ara­bic languages) nir­cmd win child title "my com­put­er" +exstyle all 0x00400000
Cre­ate a short­cut on your desk­top that clos­es all your Inter­net Explor­er windows nircmd.exe cmd­short­cut " "~$folder.desktop$ "Close All IE" win close class "IEFrame"
Cre­ate a short­cut on your desk­top that hides all your Inter­net Explor­er windows nircmd.exe cmd­short­cut " "~$folder.desktop$ "Hide All IE" win hide class "IEFrame"
Cre­ate a short­cut on your desk­top that shows back all your Inter­net Explor­er windows nircmd.exe cmd­short­cut " "~$folder.desktop$ "Show All IE" win show class "IEFrame"
Set the Win­dows Cal­cu­la­tor as top-most win­dow (above all oth­er windows) nircmd.exe win set­top­most title "Cal­cu­la­tor" 1
Set the Win­dows Cal­cu­la­tor back to reg­u­lar win­dow (non top-most window) nircmd.exe win set­top­most title "Cal­cu­la­tor" 0
Cre­ate a short­cut to Win­dows cal­cu­la­tor under Start Menu->Programs->Calculators nircmd.exe short­cut "f:winntsystem32calc.exe" "~$folder.programs$Calculators" "Win­dows Calculator"
Hide the desk­top window nircmd.exe win hide class progman
Show the desk­top win­dow (After hid­ing it in pre­vi­ous example) nircmd.exe win show class progman
Hide the start but­ton on the sys­tem tray nircmd.exe win child class "Shell_TrayWnd" hide class "but­ton"
Show the start but­ton on the sys­tem tray nircmd.exe win child class "Shell_TrayWnd" show class "but­ton"
Hide the clock on the sys­tem tray nircmd.exe win child class "Shell_TrayWnd" hide class "Tray­Clock­W­Class"
Show the clock on the sys­tem tray nircmd.exe win child class "Shell_TrayWnd" show class "Tray­Clock­W­Class"
Kill (ter­mi­nate) all instance of Inter­net Explor­er processes nircmd.exe kill­process iexplore.exe
Cre­ate a short­cut on your desk­top that opens the door of K: CDROM dri­ve when you run it. nircmd.exe cmd­short­cut "~$folder.desktop$" "Open CDROM" cdrom open k:
Cre­ate a short­cut to Nir­Soft Web site on your desktop nircmd.exe url­short­cut "http://www.nirsoft.net" "~$folder.desktop$" "Nir­Soft"
Add Nir­Soft Web site to your Favorities under Links folder. nircmd.exe url­short­cut "http://www.nirsoft.net" "~$folder.favorites$Links" "Nir­Soft"
Cre­ate a short­cut to Nir­Soft Web site on the desk­top of all com­put­ers list­ed in computers.txt nircmd.exe mul­ti­re­mote copy "c:tempcomputers.txt" url­short­cut "http://www.nirsoft.net" "~$folder.common_desktop$" "Nir­Soft"
Set the dis­play mode to 800x600x24bit colors nircmd.exe set­dis­play 800 600 24
Cre­ate a short­cut on the desk­top that set the dis­play mode to 800x600x24bit colors nircmd.exe cmd­short­cut "~$folder.desktop$" "800x600x24" set­dis­play 800 600 24
Copy all short­cuts on your desk­top to anoth­er fold­er (f:tempdesktop). nircmd.exe execmd copy "~$folder.desktop$*.lnk" f:tempdesktop
Restart your Apache serv­er (under Win­dows NT/2000/XP/2003) nircmd.exe ser­vice restart apache
Cre­ate a short­cut on your desk­top that restarts the Apache server nircmd.exe cmd­short­cut "~$folder.desktop$" "Restart Apache" ser­vice restart apache
Restart your IIS nircmd.exe ser­vice restart w3svc
Restart MySql nircmd.exe ser­vice restart MySql
Open the desired Reg­istry key/value in RegEdit nircmd.exe reged­it "HKLM\Software\Microsoft\Windows\CurrentVersion" "Com­mon­Files­Dir"
Open the Reg­istry key that you copied to the clip­board in RegEdit. nir­cmd reged­it "~$clip­board$"
Dis­able the screen saver nircmd.exe regset­val sz "HKCU\control panel\desktop" "Screen­Save­Ac­tive" 0
Enable the screen saver nircmd.exe regset­val sz "HKCU\control panel\desktop" "Screen­Save­Ac­tive" 1
Change the date/time of the spec­i­fied file­name (cre­ation time and mod­i­fied time) nircmd.exe set­file­time "c:tempmyfile.txt" "24–06-2003 17:57:11" "22–11-2005 10:21:56"
Copy your desk­top fold­er path to the clipboard nircmd.exe clip­board set ~$folder.desktop$
Copy your start menu fold­er path to the clipboard nircmd.exe clip­board set ~$folder.start_menu$
Copy the con­tent of info1.txt (sim­ple text file) to the clipboard nircmd.exe clip­board read­file "c:My Filesinfo1.txt"
Add the text con­tent of clip­board to info1.txt nircmd.exe clip­board addfile "c:My Filesinfo1.txt"
Clear the clipboard nircmd.exe clip­board clear
Cre­ate all fold­ers spec­i­fied in "c:tempfolders.txt". The fold­er path names are sep­a­rat­ed by CRLF characters. nircmd.exe params­file "c:tempfolders.txt" "" "" execmd md ~$fparam.1$
Install the spec­i­fied .NET assem­bly in the glob­al assem­bly cache (like gacutil) nircmd.exe gac install "C:tempMyAssemblybinMyAssembly.dll"
Emp­ty the recy­cle bin in all drives. nircmd.exe emp­ty­bin
Answer 'Yes' to a stan­dard Win­dows message-box. nircmd.exe dlg "" "" click yes
Wait 2 sec­onds, and then save the cur­rent screen to shot.png nircmd.exe cmd­wait 2000 save­screen­shot "f:tempshot.png"
Save 10 screen­shots in a loop, and wait 60 sec­onds between the screen­shot save calls. The file­names of the screen­shot will con­tain the time and date of the saved screenshot. nircmd.exe loop 10 60000 save­screen­shot c:tempscr~$currdate.MM_dd_yyyy$-~$currtime.HH_mm_ss$.png
Wait until Fire­fox is closed, and then say "Fire­fox was closed" wait­process firefox.exe speak text "Fire­fox was closed"

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

5 + 2 =