提供对 CreateScript() 方法(用于创建远程脚本过程)的访问。
下面的示例使用控制器对象来创建 WshRemote 对象。
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
var Controller = WScript.CreateObject("WSHController
");
var RemoteScript = Controller.CreateScript("test.js", "remoteserver");
RemoteScript.Execute();
while (RemoteScript.Status != 2) {
WScript.Sleep(100);
}