Breaking

Thursday, September 10, 2020

How To Create A Simple Shutdown Timer By Using Notepad

 

How To Create A Simple Shutdown Timer By Using Notepad




Today I’m going to show you an easy way to create your own Shutdown Timer by using a notepad. You can even do this by using your HTML editor. Follow the below given steps and have fun.

 

Steps To Create A Simple Shutdown Timer:


Step 1 : Open New Text Document :

Right-click on your desktop and select the ” create a new text document ” option or just simply Open a Notepad.

 

Step 2 : Copy-Paste :

 Copy and paste the below given code on to the notepad.





Code :

@echo off
:Start
title Shutdown Timer
color 07
echo Type in an amount of time (in Seconds)
set /p time=
color 07
:loop
cls
ping localhost -n 2 > nul
set /a time=%time%-1
echo %time%
if %time% EQU 0 goto Timesup
goto loop
:Timesup
title Time Is Up!
ping localhost -n 2 >nul
ping localhost -n 2 >nul
color 07
echo You have only 20 seconds before Windows Will shut down!
ping localhost -n 20 >nul
ping localhost -n 2 >nul
ping localhost -n 2 >nul
ping localhost -n 1 >nul
ping localhost -n 1 >nul
ping localhost -n 1 >nul
goto Shutdown
:Shutdown
color 70
echo Your Windows is now shutting down! Bye Bye Friend
ping localhost -n 1 >nul
start C:\Windows\System32\Shutdown.exe -s

 

Step 3 : Save The File :


Save this Text document As " ShudownTimer.bat ", but make sure that the file type is selected as " All files " and saved with " .bat " extension. Set the Encoding To " ANSI ".

 

Step 4 : Run The File :


Just double click on the saved File To Execute. Now you will be asked to set the timer for the shutdown.



Share Your Views And Doubts In comments…



It’s easy, isn’t it? Do try it yourself and don’t forget to share it with your friends on Facebook, Whatsapp, etc.

No comments:

Post a Comment