# Choice Command Issues



## archer_ (Apr 27, 2009)

Hi Guys,

I had this system working perfectly fine until last week, I had an external drive which boots into dos and displays the below choice command from the autoexec.bat. I make a selection acording to the model I wish to close and then the command below start ghost and the cloning process without the need to go through the usual process of selecting the images from a source. 

We moved the images and commands across to a larger drive as we were running out of space and now when I make a selection ghost opens but doesn't execute the rest of the command to start the cloning process as it did before, it just sits on the welcome screen of ghost itself. I have tried the drive on a number of machine and the result is the same.

I though it was the code that was the issue (maybe I entered a comma or space somewhere) but if I boot into dos only and then manually enter the command as it is in the script all is fine!

I've looked over my notes time and time again and eveything seems fine, but the old drive has already been format in error so I can't check the autoexec on that! If someone could notice any reason why this isn't work I would be much appreciated.

Many Thanks

James

@echo off 
cls
:begin
ECHO .....................................................
ECHO Welcome to the Automatic Ghost Builder
ECHO Please select which model you wish to clone
ECHO Then Ghost will automatically build the machine
ECHO .....................................................
ECHO 1. Optiplex 745
ECHO 2. Optiplex 755
ECHO 3. Optiplex 760
ECHO 4. Latitude D620
ECHO 5. Latitude D630
ECHO 6. Latitude E6400
ECHO 7. IBM/Lenovo T410
ECHO 8. IBM/Lenovo M58e
ECHO 9. Symantec Ghost 2003
ECHO .....................................................
CHOICE /n /c:123456789 Please make a selection? (1,2,3,4,5,6,7,8 or 9)%1
IF ERRORLEVEL ==0 GOTO NINE
IF ERRORLEVEL ==8 GOTO EIGHT
IF ERRORLEVEL ==7 GOTO SEVEN
IF ERRORLEVEL ==6 GOTO SIX
IF ERRORLEVEL ==5 GOTO FIVE
IF ERRORLEVEL ==4 GOTO Four
IF ERRORLEVEL ==3 GOTO THREE
IF ERRORLEVEL ==2 GOTO TWO
IF ERRORLEVEL ==1 GOTO ONE
GOTOEND
:NINE
cd bin
ghost.exe -wd- -ws-
:EIGHT
cd bin
ghost.exe -clone,mode=load,src=c:\Images\IMAGE4\M58SP1.GHO,dst=2,sze1=40P,sze2=V -sure -rb
:SEVEN
cd bin
ghost.exe -clone,mode=load,src=c:\Images\IMAGE3\T410.GHO,dst=2,sze1=40P,sze2=V -sure -rb
:SIX
cd bin
ghost.exe -clone,mode=load,src=c:\Images\IMAGE2\IMG45409.GHO,dst=2,sze1=40P,sze2=V -sure -rb
GOTO END
:FIVE
cd bin
ghost.exe -clone,mode=load,src=c:\Images\IMAGE6\D630.GHO,dst=2,sze1=40P,sze2=V -sure -rb
GOTO END
:FOUR
cd bin
ghost.exe -clone,mode=load,src=c:\Images\IMAGE5\D620.GHO,dst=2,sze1=40P,sze2=V -sure -rb
GOTO END
:THREE
cd bin
ghost.exe -clone,mode=load,src=c:\Images\IMAGE2\IMG45409.GHO,dst=2,sze1=40P,sze2=V -sure -rb
GOTO END
:TWO
cd bin
ghost.exe -clone,mode=load,src=c:\Images\IMAGE1\IMG34451.GHO,dst=2,sze1=40P,sze2=V -sure -rb
GOTOEND
:ONE
cd bin
ghost.exe -clone,mode=load,src=c:\Images\IMAGE1\IMG34451.GHO,dst=2,sze1=40P,sze2=V -sure -rb
:END


----------



## leroys1000 (Aug 16, 2007)

I'm no expert on this but you have echo turned off in the first line,
then you are running echo commands after that.
Can that be hanging it?
Probably not if you are getting the selection menu.


----------

