Microsoft® Windows® 2000 Scripting Guide
« Previous | Next »
The WshController object provides you with the ability to run scripts on remote computers. The WshController object has a single method, CreateScript, which returns a WshRemote object.
In turn, the WshRemote object can then be used to run the worker script. The worker script is not run as a result of the call to CreateScript. Instead, the WshRemote object Execute method is used to actually run the script on the remote computer.
The script in Listing 3.42 runs the hypothetical worker script MapNetworkDrive.vbs on the remote computer, RASServer01. Although the location of the worker script can be specified using either a local file path or a UNC path, because no path is specified in Listing 3.42, this means the worker script must be located in the same directory as the controller script.
Listing 3.42 Running a Local Script on a Remote Computer
|
|
Note
Send us your feedback | « Previous | Next » |