Hi,
I wrote the following script to image a machine over network.
Set WshShell=WScript.CreateObject("WScript.Shell")
Set WshSysEnv=WshShell.Environment("SYSTEM")
Set oShell = WScript.CreateObject ("WScript.shell")
ImagePath=WshSysEnv("ImagePath")
WScript.Echo "Done"
sCommand="X:\GHOST80\GHOST32 -clone,mode=restore,src=" & ImagePath &
",dst=1 -sure -FX"
oShell.run sCommand
oShell.run "X:\Scripts\PostImage\PostImage.bat"
Now, when I run this script, GHOST32 imaging starts and immediately
after that PostImage.BAT also starts which is not expected. I
understand this behavior because I haven't told my script to wait till
the previous command finishes. GHOST32 returns true value to my script
and it then start executing PostImage.BAT
Is there anyway I make the script to wait till GHOST imaging process is
complete and then execute PostImage.BAT command.
Thanks in advance,
Ravi