Radified Community Forums | |
http://radified.com/cgi-bin/yabb2/YaBB.pl
Rad Community Technical Discussion Boards (Computer Hardware + PC Software) >> Norton Ghost 2003, Ghost v8.x + Ghost Solution Suite (GSS) Discussion Board >> Batch file(s) execution after Ghost restore.. http://radified.com/cgi-bin/yabb2/YaBB.pl?num=1105064051 Message started by bananaheadache on Jan 6th, 2005 at 10:14pm |
Title: Batch file(s) execution after Ghost restore.. Post by bananaheadache on Jan 6th, 2005 at 10:14pm
Hello,
I'm using Ghost 2003 and I've a question about automating the execution of a couple batch files after doing a ghost partition restore from a ghost bootable cd-rom. The contents of my ghost.bat file looks like this: GHOST.EXE -clone,MODE=pload,SRC=1:2\recovery\CDR00000.GHO:1,DST=1:1 -sure -fx -ntchkdsk The restore process is almost entirely automated except for two things after the restore completes. 1) I want to eject the cd-rom automatically when the ghost restore completes and returns to a DOS prompt. (I've manually tested and successfully executed a program called CDROMCOM.EXE from a DOS prompt to eject the cd-rom drive without pressing the ejection button on the drive) 2) After the cd-rom drive ejects the ghost bootable cd i want to reboot the computer allowing the restored partition to boot up into the newly restored OS. Here are the contents of a batch file named reboot.bat that I'm considering using to reboot the computer after the automated ejection of the ghost bootable cd. I've tested it and it works fine when manually executed from a DOS prompt: @ECHO OFF echo g=ffff:0000 | debug I've already tried using the -rb switch in my ghost.bat file to reboot but I would also need an eject cd switch in order for all my desired automation to work from the ghost.bat file. The only switch I could find even remotely related to ejecting media was the -tapeeject switch. Perhaps someone has an idea how to accomplish the above in a more efficient manner or knows of a ghost switch I could use to eject a cd from within ghost.bat (maybe ghost 9.0 has a switch?) In addition i've listed the contents of my AUTOEXEC.BAT and CONFIG.SYS for further clarification of the level of automation i'm trying to accomplish. (perhaps another if statement after the ghost.bat within the AUTOEXEC.BAT would work? unfortunately i'm a novice at DOS) AUTOEXEC.BAT -------------------- @ECHO OFF mouse.com path=a:\;%CDROM%:\ cls IF "%config%"=="NOCD" GOTO LQUIT LH MSCDEX.EXE /D:cdrom001 /L:E /M:30 set CDROM=FOO23 DETECTCD.EXE IF "%CDROM%"=="FOO23" GOTO NOCDROM %CDROM% cls IF "%config%"=="SUCD" GOTO LQUIT ghost.bat GOTO LQUIT :NOCDROM cls echo. echo DetectCD was unable to determine the CD-ROM drive letter. echo. :LQUIT set CDROM= CONFIG.SYS ---------------- [menu] menuitem=GHOST, You are about to Recover/Restore your computer. menudefault=CD,10 menucolor=7,0 [SUCD] device=himem.sys /testmem:off device=oakcdrom.sys /D:cdrom001 device=btdosm.sys device=flashpt.sys device=btcdrom.sys /D:cdrom001 device=aspi2dos.sys device=aspi8dos.sys device=aspi4dos.sys device=aspi8u2.sys device=aspicd.sys /D:cdrom001 [NOCD] device=himem.sys /testmem:off [GHOST] device=himem.sys /testmem:off device=oakcdrom.sys /D:cdrom001 device=btdosm.sys device=flashpt.sys device=btcdrom.sys /D:cdrom001 device=aspi2dos.sys device=aspi8dos.sys device=aspi4dos.sys device=aspi8u2.sys device=aspicd.sys /D:cdrom001 [COMMON] files=60 buffers=20 dos=high,umb stacks=9,256 lastdrive=z device=display.sys con=(ega,,1) country=001,437,country.sys install=mode.com con cp prepare=((437) ega.cpi) install=mode.com con cp select=437 install=keyb.com us,,keyboard.sys TIA Any help would be greatly appreciated! |
Title: Re: Batch file(s) execution after Ghost restore.. Post by Radministrator on Jan 8th, 2005 at 1:33am
Hey.
You need a batch-file guru. Unfortunately I am not one. I assume you've already reviewed the batch files located here: http://ghost.radified.com/ghost_4.htm I can offer only moral support at this point. |
Title: Re: Batch file(s) execution after Ghost restore.. Post by NightOwl on Jan 8th, 2005 at 1:57am
bananaheadache
If you already have DOS commands to eject the disk, and reboot the system, you should be able to have those as the last two commands in your autoexec.bat file. You may have to create a separate .bat file for the ghost command line, and have the autoexec.bat file 'call' that batch file, and after it returns to the DOS prompt, you should be taken back to the next command in the autoexec.bat file. I can not remember the exact commands, but I had an old IBM PS/1 computer whose autoexec.bat file called a 'hardware check' batch file that ran mid-way through the sequence in the autoexec.bat, then returned and completed the rest of the commands in the autoexec.bat file, and then booted Windows. Might find what you need here: http://www.vfrazee.com/ms-dos/6.22/help/ Check out the 'Call' and 'Batch Commands'. |
Title: Re: Batch file(s) execution after Ghost restore.. Post by bananaheadache on Jan 8th, 2005 at 11:18am
Hey thanks for the responses,
I've now got some great ideas perkulating and I'll post my solution once I get this little automation tested good and proper. Thanks again! |
Title: Re: Batch file(s) execution after Ghost restore.. Post by NightOwl on Jan 14th, 2005 at 8:06pm
bananaheadache
If you're still working on this batch file project, ran across this Ghost switch here: http://service1.symantec.com/SUPPORT/ghost.nsf/8f7dc138830563c888256c2200662ecd/79d3d9ff21211e7a88256d1600730eb3? Quote:
It may help in allowing the batch file to continue after Ghost is done doing it's thing. |
Radified Community Forums » Powered by YaBB 2.4! YaBB © 2000-2009. All Rights Reserved. |