Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Execute script after ghost

Posted on 2013-01-17
13
Medium Priority
?
906 Views
Last Modified: 2013-01-18
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 ?
0
Comment
Question by:cegepexchange
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
  • 3
13 Comments
 
LVL 2

Expert Comment

by:sg08234
ID: 38787576
Can you use a task scheduled on user logout?

Michael
0
 

Author Comment

by:cegepexchange
ID: 38787657
can we do that in winpe ? please tell me how !!! :)
0
 
LVL 2

Expert Comment

by:sg08234
ID: 38790425
As WinPE is a complete Windows environment the task manger should be available too (I did not check it)
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Expert Comment

by:bcruse32347
ID: 38792955
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.
0
 

Author Comment

by:cegepexchange
ID: 38792993
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.
0
 
LVL 2

Assisted Solution

by:sg08234
sg08234 earned 1000 total points
ID: 38793043
Thus the problem is "wait for it to finish"?

If so can't you use start/wait <ghost>?
0
 
LVL 2

Expert Comment

by:bcruse32347
ID: 38793391
Yes start/wait is what you want to use in the scripts.... Not just for ghost but for any following command also
0
 

Author Comment

by:cegepexchange
ID: 38793417
Ok! Thanks!

If i hit "reboot" in the ghost32.exe, will it execute the next command anyway? Probably not?
0
 
LVL 2

Expert Comment

by:bcruse32347
ID: 38793449
No it will reset the computer before the next command executes.
0
 

Author Comment

by:cegepexchange
ID: 38793456
Alright thanks! I'll try to check for a scheduled task before the reboot then.
0
 
LVL 2

Accepted Solution

by:
bcruse32347 earned 1000 total points
ID: 38793475
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...
0
 

Author Comment

by:cegepexchange
ID: 38793501
Good idea! Ill try that! thanks!
0
 

Author Closing Comment

by:cegepexchange
ID: 38793665
Thanks for all the help, it worked with start /wait until the ghost finish and then i copy my files then reboot. Thanks again!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
This Micro Tutorial will teach you how to change your appearance and customize your Windows 7 interface to your unique preference. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question