Autoexec.bat

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

MooseI386

Thread Starter
Joined
Dec 27, 2005
Messages
10
I have been trying to consolidate several programs onto a USB Bootable hard drive. I have been using the Choice command in the Autoexec.bat file to give me a choice of what programs to start. However choice is only returning errorlevel 1; no matter what number I push. Any ideals? Work in progress.

Not I use a second choice to allow a 20 sec time so I may see what Echo measage is displayed. However no matter what I push I always Get
Starting Re-image 1

@ECHO OFF
:START
CLS
ECHO -------Enter Number-------------

ECHO 1- Image PC with XP image.
ECHO 2- Image PC with 2000 image.
ECHO 3- Load Ghost 2003.
ECHO 4- Load Techie's Toolkit.
ECHO 5- Load ERD Commander.
ECHO 6- Start Computer with CD-ROM Support.
ECHO 7- Start Computer without CD-ROM Support.
ECHO 8- Run GDISK to delete all partitions.
ECHO 9- Load Drive Scrubber for DOD Cleaning.

ECHO -------Enter Number-------------

ECHO OFF

CHOICE /N /C:123456789W /T:W,20 Select a number (Windows will start in 20sec)%1


IF ERRORLEVEL 1 GOTO XP
IF ERRORLEVEL 2 GOTO 2000
IF ERRORLEVEL 3 GOTO GHOST
IF ERRORLEVEL 4 GOTO TOOLKIT
IF ERRORLEVEL 5 GOTO ERD
IF ERRORLEVEL 6 GOTO CD
IF ERRORLEVEL 7 GOTO NOCD
IF ERRORLEVEL 8 GOTO GDISK
IF ERRORLEVEL 9 GOTO DSCRUB
IF ERRORLEVEL w GOTO WIN

REM ------------1------------------------------
:XP
ECHO Starting Re-image 1

CHOICE /N /C:Z,M /T:M,20 Will start over in 20 sec
IF ERRORLEVEL Z GOTO OVER
IF ERRORLEVEL M GOTO OVER2
:OVER
ECHO START OVER
GOTO START
:OVER2
ECHO START OVER
GOTO START

REM -------------2-----------------------------
:2000
ECHO Starting Re-image 2

CHOICE /N /C:Z,M /T:M,20 Will start over in 20 sec
IF ERRORLEVEL Z GOTO OVER
IF ERRORLEVEL M GOTO OVER2
:OVER
ECHO START OVER
GOTO START
:OVER2
ECHO START OVER
GOTO START

------------------------------------------------------------------------------------
AND SO ON AND SO ON

:END
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top