Execute script after ghost

Hi !

I would like to execute a cmd, vbs, etc... script before the reboot of my computer after the ghost. I boot with WinPE, execute my imaging stuff with ghost32.exe and then i would like to execute a script that copies some files in my fresh ghosted computer before the reboot. Is it possible ?
cegepexchangeAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sg08234Commented:
Can you use a task scheduled on user logout?

Michael
cegepexchangeAuthor Commented:
can we do that in winpe ? please tell me how !!! :)
sg08234Commented:
As WinPE is a complete Windows environment the task manger should be available too (I did not check it)
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

bcruse32347Commented:
Are you setting up the ghost imaging process to be scripted or are you calling ghost from the command prompt in WinPE?? or are you using a GUI?

If you are setting it scripted just add the commands to the end of the script. If not create a script and place it in the windows directory of the WinPE image. If you are using a GUI or Desktop in WinPE add an Icon in the GUI or to the WinPE Desktop.

To add stuff into WinPE you can use a tool called GImageX.  If you need more information about editing  WinPE  I can guide you in the right direction.
cegepexchangeAuthor Commented:
Hi bcruse,

I use pxe + tftp for deploying my winpe image and when the winpe boots, a script called start.bat is executed (with the 'call ghost32.exe') in it. The problem is that I need to start the ghost, wait for it to finish and THEN i would like to execute a command and then reboot. all my scripts are in the winpe image but i need a place to call them.
sg08234Commented:
Thus the problem is "wait for it to finish"?

If so can't you use start/wait <ghost>?
bcruse32347Commented:
Yes start/wait is what you want to use in the scripts.... Not just for ghost but for any following command also
cegepexchangeAuthor Commented:
Ok! Thanks!

If i hit "reboot" in the ghost32.exe, will it execute the next command anyway? Probably not?
bcruse32347Commented:
No it will reset the computer before the next command executes.
cegepexchangeAuthor Commented:
Alright thanks! I'll try to check for a scheduled task before the reboot then.
bcruse32347Commented:
Why not do a start/wait and then have ghost close (not reset). The next command would execute after the image is laid down on the disk. Then you could copy files, add registry entries, change the name, etc...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cegepexchangeAuthor Commented:
Good idea! Ill try that! thanks!
cegepexchangeAuthor Commented:
Thanks for all the help, it worked with start /wait until the ghost finish and then i copy my files then reboot. Thanks again!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Storage Software

From novice to tech pro — start learning today.