I am trying to call a vbs file from another. The called file executes. However the control is not returning to the original vbs file. This file appears to be running as I see wscript process in task manager. But i don't see the output - the step after the run command. Any help/suggestion would be appreciated.
1.) vbs file 1 (original vbs file test3.vbs)
Set objShell = WScript.CreateObject ("WScript.shell") strErrorCode = objShell.run("cmd /K C:\temp\a\test2.vbs", 0, True) msgbox "complete test3" Set objShell = Nothing
2.) vbs file 2 (called vbs file - test2.vbs)
msgbox "in test2" WScript.Sleep 10000 msgbox "complete - test2"
3.) Expected output :
in test2 complete - test2 complete test3
in test2 complete - test2