Status Property (WshRemote)
Reports the current status of the remote script.
Object.Status
The following JScript code demonstrates how to use the Status property in a test block that checks to see if a remote script terminated normally.
Dim Controller, RemoteScript
Set Controller = WScript.CreateObject("WSHController")
Set RemoteScript = Controller.CreateScript("test.js", "remoteserver")
RemoteScript.Execute
Do While RemoteScript.Status <> 2
WScript.Sleep 100
Loop
var Controller = WScript.CreateObject("WSHController"); var RemoteScript = Controller.CreateScript("test.js", "remoteserver"); RemoteScript.Execute(); while (RemoteScript.Status != 2) { WScript.Sleep(100); }
Applies To:
Community Additions
Show: