If you are like me, who likes to listen to songs at night or when feeling sleepy, you probably get asleep without turning songs and computer off. To solve this ‘problem’, you have two options. One, stop listening to songs. Okay, sorry! I was joking. The other option is, tell your computer to turn itself off when you fell asleep. We take the second option, of course. But the computer isn’t intelligent enough to detect when you’re asleep and when you’re awake. So, now? Set a timer for Windows shutdown and restart, as simple as that. The best part is, you don’t need a software!
1. Open notepad from Start Menu -> Programs -> Accessories.
2. Type “shutdown -s -t <time is seconds for which system will wait before shutdown>”
eg. shutdown -s -t 3600
3. Save the file as “.bat” extension. A batch file is created.
Done! Now, just double-click the file before you start listening to songs and it will automatically shutdown after the time specified in step 2.
If you want the computer to restart after a specific time, there is a trick for that too. Follow the steps.
1. Go to Start Menu -> Programs -> Accessories and open Notepad.
2. Create a “.bat” extension file with “shutdown -r -t <time is seconds for which system will wait before shutdown>” as content.
That’s it! Same as above, the windows will restart after the number of seconds you specified in the file. You just need to double-click it.
Bonus Tip: Type “shutdown /help” in command prompt for more options on this shutdown command
If you think creating a file might cause “accidental” shutdown and restart because someone could click them to see what it is – don’t worry. You can do this without creating a batch file.
- Go to Start Menu -> Run (or press windows key + R)
- Type cmd and hit enter.
- In the command prompt window, type “shutdown -s -t XXXX (XXXX is time in seconds)” (with:ut quotes)
- Hit return. You’re done.
Example And Screenshot:
“shutdown -s -t 3600” (Windows will shutdown in an hour)
Accidentally initiated the command? Don’t want the PC to shutdown? Don’t panic!
To abort the shutodown, type shutdown -a in the command prompt and hit return. Phew!
If you experience and problems, or have a better trick to shutdown windows without using any software, tell us in your comments below.