I am writng a small batch file that i can use to display my ip details,along with a ping test and release/renew options.
I have got the goto and cmd options working, just need to sort out the menu system.
This is what i'm using
"
@Echo off
REM IP Utility batch file
REM Graeme Lawrence
REM 16/7/08
REM Version 1.0
:menu
ECHO Please select a function
ECHO -----------------------
ECHO 1. Get Ip Settings
ECHO 2. Ping BBC Website
ECHO 3. Release IP
ECHO 4. Renew IP
ECHO 5. Quit
PAUSE
CHOICE /C:12345 /N Choose 1, 2, 3, 4 or 5
IF ERRORLEVEL 1 GOTO ipconfig
IF ERRORLEVEL 2 GOTO ping
IF ERRORLEVEL 3 GOTO release
IF ERRORLEVEL 4 GOTO renew
IF ERRORLEVEL 5 GOTO quit
"
Also on the quit option how do I get the command window to kill itself?
Can anyone out there give me some advice.
Cheers
I have got the goto and cmd options working, just need to sort out the menu system.
This is what i'm using
"
@Echo off
REM IP Utility batch file
REM Graeme Lawrence
REM 16/7/08
REM Version 1.0
:menu
ECHO Please select a function
ECHO -----------------------
ECHO 1. Get Ip Settings
ECHO 2. Ping BBC Website
ECHO 3. Release IP
ECHO 4. Renew IP
ECHO 5. Quit
PAUSE
CHOICE /C:12345 /N Choose 1, 2, 3, 4 or 5
IF ERRORLEVEL 1 GOTO ipconfig
IF ERRORLEVEL 2 GOTO ping
IF ERRORLEVEL 3 GOTO release
IF ERRORLEVEL 4 GOTO renew
IF ERRORLEVEL 5 GOTO quit
"
Also on the quit option how do I get the command window to kill itself?
Can anyone out there give me some advice.
Cheers