![]() |
|
SHUTDOWN WITH BATCH PROGRAMMING - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Coding (https://sinister.ly/Forum-Coding) +--- Forum: Coding (https://sinister.ly/Forum-Coding--71) +--- Thread: SHUTDOWN WITH BATCH PROGRAMMING (/Thread-SHUTDOWN-WITH-BATCH-PROGRAMMING) |
SHUTDOWN WITH BATCH PROGRAMMING - jammy7777 - 09-27-2011 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. 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 RE: SHUTDOWN WITH BATCH PROGRAMMING - Jacob - 09-27-2011 not bad code. RE: SHUTDOWN WITH BATCH PROGRAMMING - ReaperX - 09-29-2011 Nice. Check Out My Power Utility. It Doesnt Display a Message When Shutting Down but its Quick. You Can Log off, Reboot, Or Shutdown with a Double Click and the Press of a Button. Download: Link RE: SHUTDOWN WITH BATCH PROGRAMMING - jammy7777 - 09-29-2011 thanks both of u, ok i will see it.@ reaperx |