How To Create A Simple Shutdown Timer By Using Notepad c
Notepad Tricks, PC Hacks

How To Create A Simple Shutdown Timer By Using Notepad

Today we are 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 .

How To Create A Simple Shutdown Timer By Using Notepad

Code :

@echo off
:Start
title Shutdown timer
color 07
echo Type in an amount of time (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 :

How To Create A Simple Shutdown Timer By Using Notepad

Save this Text document As ” OnlineCmag.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 :

How To Create A Simple Shutdown Timer By Using Notepad

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

Share Your Views And Doubts In comments…

How To Create A Simple Shutdown Timer By Using Notepad *

It’s easy isn’t it? Do try it yourself and don’t forget to share it with your friends on facebook, twitter and google+…..

 

About OnlineCmag Team

OnlineCmag is an online magazine that talks everything about computers and their Hardware, Software and Tips & Tricks to make your day to day computing easier.

Leave a Reply

Your email address will not be published. Required fields are marked *