- Back to Home »
- computer tricks , Notepad Tricks »
- Set Timer To Shut Down Your Computer :
Saturday, February 1, 2014
Set Timer in Your Computer by copying the below code in notepad and save it as shutdown.bat . Double on shutdown.bat to run the program .
@echo off
:Start
title timer
color EC
echo Type in an amount of time (Seconds)
set /p time=
:Start
title timer
color EC
echo Type in an amount of time (Seconds)
set /p time=
color CE
:loop
cls
ping localhost -n 2 >nul
set /a time=%time%-1
echo %time%
if %time% EQU 0 goto Timesup
goto loop
: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
title Time Is Up!
ping localhost -n 2 >nul
ping localhost -n 2 >nul
color 5F
echo You have 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 4F
echo Windows is now shutting down!
ping localhost -n 1 >nul