Sunday, 10 January 2016

Schedule,abort,reboot,shutdown in windows with cmd

Sometime after the software update windows automatically restart the system.(system will restart in 10 minutes) Or you may want to schedule shutdown or reboot of system.


To abort this shutdown: (before you know how to shutdown you should know how to abort)

shutdown -a or shutdown /a

Scheduling shutdown, reboot time for windows:

shutdown -s -t 30  (Shutdown will be in 30 sec)

shutdown -r -t 30 (Reboot will be in 30 sec)



Create batch file off above command:

shutdown.bat ( open notepad and write below save as shudown.bat file)

shutdown.exe -s -t -60

abort.bat ( open notepad and write below save as abort.bat file)

shutdown.exe -a

HackTips with shutdown.bat file:(first read solution)

If the shutdown.bat file is copied to "startup" folder of windows then whenever the system will start
the shutdown.bat file  command will run and system will shutdown. This will create shutdown loop the system will never start.

Where is startup folder(startup folder path)

Solution: 

Need to start windows in safe mode by pressing F8 key from your keyboard and we need to delete the shutdown.bat file from the startup folder.(in safe mode only basic programs are loaded)

Fun stuff:

Create shutdown.bat(with -t 00) file and send your friend and tell them to double click on that file to see magic or whatever.

Schedule shutdown time in some system.


No comments:

Post a Comment