How to shut down a computer using Notepad

Here are the simple steps for shutting down a computer using Notepad, using command-line Shutdown options for shutdown.exe:

Press Windows + S to open Windows Search and type Notepad in the box.

Tap on the top result to open Notepad.Type shutdown.exe -s in the Notepad.

Click on File at the top-left corner of the Notepad window and select Save as.

In the Save as window, name the file as Shutdown.bat; the Shutdown could be any name but make sure you have .bat at the end of the name instead of .txt and set the Save as type to All Files. You can save the file to your Desktop so that it can be easy to access.

Once you save this file, you can run the batch file whenever you wish to shut down your computer, and it will do so after 30 seconds.If you want to set a custom shutdown time for the shortcut, you simply have to add the -t flag with the number of seconds you want the computer to shut down. Say you want your computer to shut down after 5 minutes which is 300 seconds the command you will type in the Notepad window is shutdown.exe -s -t 300.

Afterward, just save the file just the same way we have discussed above and launch it to shut down your computer after 5 minutes.You also create a shutdown note by adding the -c flag as in shutdown.exe -s -t 300 -c “It is time to sleep” and have the file the same way we’ve discussed earlier.

To terminate the shutdown process, follow the steps below: With the steps above, you’ll be able to create a shortcut to shut down your computer with a timer and terminate it if required. Read:

How to Stop, Cancel, Abort System Shutdown in WindowsKeyboard shortcuts to Shut down or Lock Windows computer

Can I use the command prompt to shut down a Windows computer?

Yes, you can also use the command prompt to shut down your computer, and all you have to do is follow the steps below to do it:

What is the short cut key for shut down?

If you want to shut down your computer with a keyboard shortcut, simply press Alt + F4, select Shut down, and hit Enter. No matter whether you use Windows 11, Windows 10, or any other version of Windows, you can follow the same keyboard shortcut to shut down you computer within moments.

How to shutdown a computer using Notepad - 16