Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Customizing autoexec.bat 2

Status
Not open for further replies.

cjcoyle

MIS
Nov 15, 2006
55
0
0
US
Hi all,
Not sure if this is the right forum, please recommend an alternative if appropriate - thanks!

Scenario: I've automated the ghosting of my 1st partition from my second partition. I have an autoexec.bat file on the second partition that launches a simple ghost script:
The autoexec looks like this:
PROMPT=$P$G
PATH=C:\
ghost.bat

(Keep in mind, C:\ is really D:\ but it's ntfs)

ghost.bat looks like this:
ghost.exe -clone,mode=pload,src=image.gho:1,dst=1:1 -fx -sure

(Also keep in mind, the image is really on the second partition, but again we have to trick it because it doesn't see the ntfs partition)

I'm using mbrwiz.exe to reboot the system and change the active partition. The ghost process then automates. the
-fx flag brings the system back to the c:\ prompt.

My question is: How can automate the re-execution of autoexec so I can launch mbrwiz and change the active partition back again?


Thanks in advance for any help! As always, greatly appreciated!
-Chris
 
Usual step is to call the program then continue with additional lines in autoexec. Don't know if it will work in this case.

Ed Fair
Give the wrong symptoms, get the wrong solutions.
 
To broaden on what edfair has said, if you change:

ghost.bat

to:

call ghost.bat

and add your additional commands after this line, in theory what should happen is that the autoexec.bat will run as normal, call and run ghost.bat as normal, then return to autoexec.bat to run whatever commands are after the call ghost.bat line. Eg autoexec.bat:

PROMPT=$P$G
PATH=C:\
call ghost.bat
echo Ghost procedure has run

In the above example, when ghost.bat has run, the system will then display the echo statement


--------------------------------------
"Insert funny comment in here!"
--------------------------------------
 
You guys are awesome, thanks! That works, now I just gotta figure out how to script changing the active partition back.
I appreciate your time (yes Ed, I do ;)), I'll click the purple star for both of you.

-Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top