pugsley42 Posted May 10, 2006 Share Posted May 10, 2006 Here's something I've been tearing my hair out over the last couple of days: Trying to get BartPE to eject the CD, pause, then reboot the PC. I have gotten this to somewhat work with peshuteject.exe, and was hoping for some help. To start with, I have a "reboot.cmd" file I created that will change directories to the RAM drive, release the IP, then reboot. Since peshuteject, I've modified it to read (B: is the RAMDRIVE):=========================b:ipconfig /release@echo offcopy %SystemDrive%\Programs\Reboot\peshuteject.exe b:\b:\peshuteject.exe /eject:%systemdrive%cls@echo.@echo.@echo. Please remove BartPE from the drive and press SPACE to reboot@echo.@echo.pauseb:\peshuteject.exe /reboot=========================I have the reboot.cmd file set to copy to the RAMDRIVE on bootup, and put the %ramdrv% in the PATH statement of pebuilder.inf so the reboot.cmd can be run from anywhere. When it fails, it hangs immediately after ejecting the CD. I can do the "peshuteject.exe /eject:%systemdrive% /reboot", but that doesn't give the tech enough time to remove the CD before the PC reboots and yanks it back in.Help! Link to comment Share on other sites More sharing options...
Method101 Posted October 3, 2006 Share Posted October 3, 2006 (edited) Sorry for digging up such an old thread, but its the best info Ive found...My source disk doesnt contain choice.exe - how can I specify the custom.inf file to look in another location for it?OrCan I simply build an ISO image and then use an ISO image editor to add choice.exe to the i386\system32 directory later? (I have tried this, however when choice.exe is executed it appears to lock up, nothing happens. I havent tried copying choice.exe to the folder that contains the batch file, but from testing on my own (XP Build) machine I have found it wont work unless the file is called from the system32 directory - edit: also i have tried running choice.exe from the bart cd's system32 directory however it doesnt work).. Any ideas? Thanks Edited October 3, 2006 by Method101 Link to comment Share on other sites More sharing options...
Method101 Posted October 5, 2006 Share Posted October 5, 2006 (edited) Ive been playing around with this choice.exe problem. Choice.exe works when stored in the same directory as the batch file. The batch file executable commands had to contain the full path to choice.exe as I created a menu item in nu2menu.xml. So all my problems are solved. Sweet. Edited October 5, 2006 by Method101 Link to comment Share on other sites More sharing options...
cuts Posted October 11, 2006 Share Posted October 11, 2006 hello this thead has really helped me a lot. 2 days ago I was using dos/ghost8.exe now i'm using bartpe/ghost32 and able to use batch file with to automate the whole restore process. Here is issue i'm having right now and it's probably simple but can't get it to work. I would like to create a menu.bat that will launch and give users choice of which image to restore, I just need a simple batch file to this with echo commands. I ahve the batch file in that ini file, but when I bartpe finish mapping network drives, etc. I see the batch file appear and disappear real quick, so i'm not albe to see the menu, can anyone let me know what command to use, so the dos box does not disappear?here is code i havecls@ECHO offPROMPTT:cd T:\images\scriptsECHO Enter appropriate PC type to image:ECHO D530SP - SYSPREP for D530ECHO ghost600 - SYSPREP for VL600ECHO ghost600 - SYSPREP for VL400ECHO 600 - VL600 std buildECHO 400 - VL400 std buildECHO farm600 - VL600 Farm BuildECHO farm600 - VL400 Farm BuildThanks for all your help, nuff respect. Link to comment Share on other sites More sharing options...
uid0 Posted October 12, 2006 Share Posted October 12, 2006 All your script does is echo some text, that's why it closes quickly.:_startECHO A D530ECHO B VL600SET /P Choice=Please select:IF NOT '%Choice%'=='' SET Choice=%Choice:~0,1%ECHO.IF /I '%Choice%'=='A' GOTO _labelAIF /I '%Choice%'=='B' GOTO _labelBECHO "%Choice%" is not valid.ECHO.GOTO _start:_labelAghost32.exe ... Link to comment Share on other sites More sharing options...
cuts Posted October 12, 2006 Share Posted October 12, 2006 Thanks a lot I'll give that a try. I ended up creating 2 batch files, menu and menu1,menu is in the ini file in pebuilder and it calls menu1menu1 Starts the winpe command prompt, I set it to 0 = start "cmd.exe" /wait and then it calls the menu1, which has the menu stuff I wrote above, this seems to work great, if I have to redo the menu, I dont have to rebuild bart pe, I just edit the menu1 on the server where I store the images.Thanks for all your help.Is there a list of necessary things that loads with bart PE, i'm trying to make the initial startup of bart pe, go a bit faster, if I take out certain apps will it load faster, I would really like to just have the start button and ghost application and the shutdown/restart command and thats it.Thanks again. Link to comment Share on other sites More sharing options...
Jakestevens2020 Posted December 22, 2010 Share Posted December 22, 2010 Have to say thanks for this thread is been really great in getting me to where i wanted to be!!!! Ive done a bit of work on the scripting of ghost for different images so i thought id share! heres whats in my menu.bat file......youll need to change the menu option namesthen the GOTO headings (HP8100ma)The path to your ghost32.exe (mines ghost11)and the path to your image (src=G:\DELL745\745F.GHO) (G: is my mapped drive that has the ghost images)---------------------------------------------------------------------------------------@echo offCLSecho Main Menu:echo Please select the system and Image to Ghost.:loopecho A HP 8100 - Main imageecho B HP 8100 - Summationecho C HP 7800 - Main Imageecho D Dell 745 - Main Imageecho Q QuitSET /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%IF /I '%Choice%'=='A' GOTO HP8100maIF /I '%Choice%'=='B' GOTO HP8100SUIF /I '%Choice%'=='C' GOTO HP7800MAIF /I '%Choice%'=='D' GOTO Dell745MIF /I '%Choice%'=='Q' GOTO EndECHO "%Choice%" is not valid. Please try again.ECHO.GOTO Loop:: =================================:HP8100maX:\Programs\ghost11\ghost32.exe -clone,mode=prestore,src=G:\HP810\810F.GHO:1,dst=1:1 -sureGOTO end:: =================================:HP8100SUX:\Programs\ghost11\ghost32.exe -clone,mode=prestore,src=G:\HP810\810S.GHO:1,dst=1:1 -sureGOTO end:: =================================:HP7800MAX:\Programs\ghost11\ghost32.exe -clone,mode=prestore,src=G:\HP780\780F.GHO:1,dst=1:1 -sureGOTO end:: =================================:Dell745MX:\Programs\ghost11\ghost32.exe -clone,mode=prestore,src=G:\DELL745\745F.GHO:1,dst=1:1 -sureGOTO end:: =================================:endpause-----------------------------------------------------------------------------------------------Hope this helps :-)any questions just ask!!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now