hello friends,
i've been trying to make bat files, with the help of some dos help and some of internet help. i did make some simple scripts easily.
but i don't know whats wrong with this code, i'm trying to make shutdown script.
please assist me.
here's the code.
@echo off
TITLE SHUTTING DOWN THE SYSTEM
echo What U wish to do..?
echo 1. shutdown
echo 2. restart
echo 3. hibernate
set /p options= "Options:"
if "%options%" EQU "1" goto STDN
:STDN
echo Shutting down...
shutdown /s /t 30
echo System will shutdown within less than a minute.
echo Save all files before shutdown.
echo Press 1 to abort shutdown.
:ABRT
echo aborting.
ping 1.1.1.1 -w 1000>NUL
echo aborting....
ping 1.1.1.1 -w 1000>NUL
echo aborting.......
ping 1.1.1.1 -w 1000>NUL
echo aborting..........
ping 1.1.1.1 -w 1000>NUL
echo aborting............
ping 1.1.1.1 -w 1000>NUL
shutdown /a
if "%options%" EQU "2"
shutdown /r
if "%options%" EQU "3"
shutdown /h
:END