Event that is fired when an error occurs in the remote script.
Object_Error
The remote script object fires the Error event when the remote script terminates prematurely. The Error property contains the WshRemoteError object (which holds information about the error that caused the remote script to terminate prematurely).
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 Object | WshRemote Object | WshRemoteError Object | Status Property | Error Property | Execute Method | Terminate Method | Start Event | End Event