ner Posted May 15, 2009 Posted May 15, 2009 (edited) Hi all,I have created a new bootable CD under WinPE 3.0 and have also created a simple menu (thanks to you all at MSFN) and it works all OK. The only issue I have is that after restoring the image, Ghost exits back to the cmd prompt, and in order to restart the system i need to type in "Exit". Does anyone know what i can do, i have attached the menu screenshot and the ghost command used is~:GHOST32.EXE -clone,MODE=restore,SRC=R:\IMAGE.GHO,dst=1 -sure -quiet -span -FX (now the -rb switch used by ghost will restart the PC, but i want to go back to the main menu- can this be done?) Edited May 15, 2009 by ner
IcemanND Posted May 15, 2009 Posted May 15, 2009 Post your code, that may help us see what you need to do.
ner Posted May 15, 2009 Author Posted May 15, 2009 the menu code is here:@ECHO OFFCLS:LOOPECHO.SYSTEM RECOVERY KIT MENU V2.0ECHO.ECHO.ECHO A. Start System Recovery Kit - Fully automatedECHO B. Start System Recovery Kit - ManualECHO C. Run ExplorerXPECHO D. Capture Image using Microsoft ImagexECHO E. Apply Image using Microsoft ImagexECHO F. Run Diskpart - 1 partition creation and setup for disk 0ECHO G. Start Backup Recovery - Fully Automated ECHO H. Start Symantec Norton GhostECHO I. Start Symantec Norton Ghost ExplorerECHO Q. Quit MenuECHO.:: SET /P prompts for input and sets the variable:: to whatever the user typesSET Choice=SET /P Choice=Type the letter and press Enter::: The syntax in the next line extracts the substring:: starting at 0 (the beginning) and 1 character longIF NOT '%Choice%'=='' SET Choice=%Choice:~0,1%ECHO.:: /I makes the IF comparison case-insensitiveIF /I '%Choice%'=='A' GOTO ItemAIF /I '%Choice%'=='B' GOTO ItemBIF /I '%Choice%'=='C' GOTO ItemCIF /I '%Choice%'=='D' GOTO ItemDIF /I '%Choice%'=='E' GOTO ItemEIF /I '%Choice%'=='F' GOTO ItemFIF /I '%Choice%'=='G' GOTO ItemGIF /I '%Choice%'=='H' GOTO ItemHIF /I '%Choice%'=='I' GOTO ItemIIF /I '%Choice%'=='Q' GOTO EndECHO "%Choice%" is not valid. Please try again.ECHO.GOTO Loop:ItemARECOVERY32.EXE -clone,MODE=restore,SRC=R:\IMAGE.GHO,dst=1 -sure -quiet -span -RBGOTO Again:ItemBRECOVERY32.EXE GOTO END:ItemCExplorerxp.exe /sGOTO END:ItemDimagex_capture.cmdGOTO END:ItemEimagex_apply.cmdgoto END:ItemfDiskpart.cmdgoto END:ItemGGHOST32.EXE -clone,MODE=restore,SRC=D:\BACKUP.GHO,dst=1 -sure -quiet -span -RBgoto END:ItemHGHOST32.EXEgoto END:ItemIGHOSTexp.EXEgoto END:QUIT:Endsee i have updated the last switch on the ghost command to read -rb and have taken away the -fx - this re-boots the pc OK, but i wanted to go back to the menu, but i get back to the cmd prompt, if i type in "Menu" it works...
IcemanND Posted May 15, 2009 Posted May 15, 2009 Replace your 'goto END' to 'goto LOOP' where you want to return to your menu.If this menu is running from the Startnet.cmd, add an EXIT command as the last line in startnet.cmd to cause the reboot.
Tripredacus Posted May 15, 2009 Posted May 15, 2009 Replace your 'goto END' to 'goto LOOP' where you want to return to your menu.If this menu is running from the Startnet.cmd, add an EXIT command as the last line in startnet.cmd to cause the reboot.Alternatively, he could also use the Q. option to run 'wpeutil reboot' correct?
gadget Posted May 20, 2009 Posted May 20, 2009 (edited) Deleted.My post about PEShutdown is so dated, please ignore it. Edited May 20, 2009 by gadget
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now