Full width home advertisement

Welcome Home

Post Page Advertisement [Top]

Have you ever left your computer on because you had something going in the background? Do you know that you can create a shutdown timer app on your Windows PC.

Now a lot of people don't turn their computer off, but in case you prefer to keep your computer off when you’re not using it for sometime, then you should try this.

For example, you have something running in the background on your PC and you are going out to get some stuffs. So since you don't know the exact time you'll be back, but you already know the time the running program is going to complete, you can just create a shutdown timer.

So we'll show you how to create a shortcut on your desktop that will allow you set a shutdown timer.

So here’s how to do just that

Now there are two methods which are:

Using a Shortcut 

So right-click on your desktop, then select New, and then click on Shortcut. A window will open asking you for the location of the shortcut. Copy and paste the below command in the text-field:

shutdown.exe -s -t XXX

So in the above shortcut, replace the "XXX" with the number of seconds you would want it to count before shutting down. For example, if you want to two minutes, replace the "XXX" with 120. This will make the below command:

shutdown.exe -s -t 120

So once the time ticks down to 0, your computer will shut down. Also if you don’t need a shortcut, you can just enter the command inside the command prompt.

Using a Batch File

So in this method, we'll create a batch file that will do the work easily.

So open any text editor like Notepad or Notepad++.

Then copy and paste the below code inside text editor

@echo off
color 09
echo Enter below the count down time
set /p time=Time:

set /a time=%time%-1
if %time%==0 goto timesup
echo Time remaining %time%
ping localhost -n 2 > nul
goto loop

shutdown -s
msg * Time up, Shutting Down!

Then save it as a .bat file extension.

Then run it.

So in case you don't want to stress your self in creating this batch file, you can download it from here directly.

If you want to cancel the shutdown process, you can just use the below code for the shortcut method.

shutdown.exe -a

Or copy and paste the following command in command prompt.

shutdown -a

No comments:

Post a Comment

Bottom Ad [Post Page]