Shut Down Window

shutdown /s /t 0


The first word "shutdown" invokes the command line program that does the job of shutting down or rebooting the computer. The parameter "/s" that follows tells the program that it is to shut down (as opposed to rebooting, which uses "/r"). The "/t 0" option tells the program that it is to start work immediately (ie, in 0 seconds).


Note : You can add alert message by using this code : shutdown /s /t 0 /c "Your Message"