Run a command on a system (VBScript)
This code can be found in
Chapter 10 of Windows XP Cookbook
Purchase XP Cookbook or Networking Recipes for only $25 plus shipping! While supplies last.
Find out how to download all of the VBScript code from this site.
' From the book "Windows XP Cookbook"
' ISBN: 0596007256
' ------ SCRIPT CONFIGURATION ------
strComputer = "<HostName>"
strCommand = "cscript.exe c:\scripts\dircheck.vbs"
' ------ END CONFIGURATION ---------
set objController = WScript.CreateObject("WSHController")
set objRemoteScript = objController.CreateScript(strCommand, strComputer)
WScript.ConnectObject objRemoteScript, "remote_"
objRemoteScript.Execute
do While objRemoteScript.Status <> 2
WScript.Sleep 100
loop
WScript.DisconnectObject objRemoteScript
|
This code has been viewed 9403 times.
|
New from the creators of TechTasks.com:
StatSheet.com
|