Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Reports the current status of the remote script.
Syntax
Object.Status
Arguments
- Object
WshRemote object.
Remarks
The Status property returns a read-only enumerated data type.
Values
The Status property returns one of three possible values.
Return Value |
Numeric value |
Description |
---|---|---|
NoTask |
0 |
The remote script object has been created but has not yet executed. |
Running |
1 |
The remote script object is currently running. |
Finished |
2 |
The remote script object has finished running. |
Legacy Code Example
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:
See Also
WshController Object
Error Property (WshRemote)
Execute Method (Windows Script Host)
Terminate Method (WshScriptExec)
Start Event
End Event
Error Event