SHUTDOWN WITH BATCH PROGRAMMING 09-27-2011, 12:25 PM
#1
this is a program for shutting down your pc with the help of batch file.
for this you have to do some steps
1. copy these codes given below.
2. open note pad
3. paste this code on note pad
4. save it by any desired name but make sure extension of this file must be .bat
5. now execute the program and follow the steps of program
THANKS FOR READING
for this you have to do some steps
1. copy these codes given below.
Code:
@echo off
color 3
title Conditional Shutdown
set /p name=enter a name:
:start
cls
echo Hi, %name%
echo.
echo 1.Shutdown
echo 2.Quit
:invalid_choice
set /p choice=enter your choice 1,2:
if %choice%==1 goto shutdown
if %choice%==2 exit
echo invalid choice: %choice%
goto invalid_choice
:shutdown
cls
set /p sec=enter the number of seconds that you wish the computer to shutdown in:
set /p message=enter the shutdown message you wish to display:
shutdown.exe -s -f -t %sec% -c "%message%"
echo shutdown initiated at %time%
set /p cancel=type cancel to stop shutdown
if %cancel%==cancel shutdown.exe -a
if %cancel%==cancel goto start2. open note pad
3. paste this code on note pad
4. save it by any desired name but make sure extension of this file must be .bat
5. now execute the program and follow the steps of program
THANKS FOR READING
![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)