Windows Script Host  

WshController Object

'WScript Object

Provides access to the CreateScript() method (for creating a remote script process).

Example

The following example uses a controller object to create a WshRemote object.

[VBScript]
Dim Controller, RemoteScript
Set Controller = WScript.CreateObject("WSHController")
Set RemoteScript = Controller.CreateScript("remote1.js")
RemoteScript.Execute

Do While RemoteScript.Status <> 2 
    WScript.Sleep 100
Loop
[JScript]
var Controller = WScript.CreateObject("WSHController");
var RemoteScript = Controller.CreateScript("test.js", "remoteserver");
RemoteScript.Execute();

while (RemoteScript.Status != 2) {
    WScript.Sleep(100);
}

Methods

CreateScript Method

See Also

CreateObject Method