該事件在遠(yuǎn)程腳本開(kāi)始執(zhí)行時(shí)引發(fā)。
Object_Start
Start 事件在調(diào)用 Execute 方法時(shí)引發(fā)。
var WshController = new ActiveXObject("WSHController");
var RemoteProc = WshController.CreateScript("foo.wsf", "remotemachine");
WScript.ConnectObject(RemoteProc, "RemoteProc_");
var Done = false;
RemoteProc.Execute();
while (!Done)
WScript.Sleep(100);
function RemoteProc_End()
{
WScript.Echo("The process has ended");
Done = true;
}
function RemoteProc_Error()
{
WScript.Echo("An error has occurred:" + RemoteProc.Error.Description);
Done = true;
}
function RemoteProc_Start()
{
WScript.Echo("The process has started");
}
WshController 對(duì)象 | WshRemote 對(duì)象 | Status 屬性 | Error 屬性 | Execute 方法 | Terminate 方法 | End 事件 | Error 事件