Thursday, 2 March 2017

How to Automatically Shut Down or restart Your Computer at a Specified Time using bat files

How to Automatically Shut Down Your Computer at a Specified Time using bat files. Shut down your computer at specified is very useful.Here is tutorials that help you to shutdown your computer at single click using bat file. This tutorials help you to create bat file without having any knowledge of any programming. 





1.Open notepad by going to Start> All Programmes> Accessories> Notepad. Or, you can just type "notepad", without quotes, into the start menu and hit enter


2.Copy the following code:@echo off
 :W
if %time%==00:00:00.00 goto :X
goto :W
 :X
shutdown.exe /s /f /t 60 /c "Go to bed!!!!!!"

•This constantly checks the time to see if it is midnight and, if it is, it shuts down the computer with the message "Go to bed!!!!"  Replace shutdown.exe with restart.exe for restart
3.Change the if %time%== part to a time of your choice. It must be in this format: HH:MM:SS.MS and in 24 hr format otherwise it won't work.

4.Go to File> Save As.Change the "Save as type" box to "All Files"

•Type "timer.bat" into file name and click "Save"

5.Double click the file. A blank command prompt screen should appear.

6.Leave this window open while you do your work.
7.When the time you specified in step 3 comes around, your computer should display a message for one minute, then shut down.

8.If you wish to abort the shutdown, press the Windows Key (the key with the Microsoft logo on it) + R.



9.Type "shutdown -a", without quotes into the window that appears and hit Enter. A Command Prompt window should appear, then disappear. A balloon similar to this one should appear.


No comments:

Post a Comment

Video subscribe and like

Hi Guys Find the videos