|

Automatic Shutdown PC With simple batch programming


Automatic Shutdown PC With simple batch programming

after knowing the basic programming batch (batch introduction) we know batch programming that can be utilized for the purpose of the computer operating system windows. we can delete or save a file and the other we need using the batch programming, such as deleting a folder, delete a file, save a file, we can even make use FTP batch programming, and many more after we know and understand about bacth programming, this time itcomputerzone will share how to create a simple alarm computer programming using the batch.

code:

shutdown -s -t 3600 -t "the computer will shutdown in 1 hour"

Write the code in Notepad, and save it using the extension .bat
eg. automaticShutdown.bat after that please double-click the automaticShutdown.bat then the computer will shutdown in otomati within 1 hour

1.jpg

code explanation:

shutdown :command to shut down the computer
-s : is the command to do the shutdown not restart
-t : is the code for how many seconds after the computer will shutdown
-C : a comment which will show in the Box Shutdown

the batch program can also be used to restart computer, so we can make setting up the computer will restart after the time at which define, following the example code:

shutdown -r -t 3600 -c "computer will restart after 1 hour"

 

Posted by Unknown on 1:58 PM. Filed under . You can follow any responses to this entry through the RSS 2.0. Feel free to leave a response