| |
Country73
Posts: 732
Score: 10
Joined: 8/25/2004
From: USA
Status: offline
|
To run DIR against another machine you can use this: '------------------------------------------------------------------------------------------- strComputer = "Machine Name" strShare = "The Share" Set objShell = CreateObject("Wscript.Shell") Set objExec = objShell.Exec("cmd /c dir \\" & strComputer & "\" & strShare) val = val & objExec.StdOut.ReadAll wscript.echo val '------------------------------------------------------------------------------------------ If you're actually wanting to run an executible/script/whatever, then you're going to need to use something like PSEXEC in your script. Without, you'll still be able to run those items, but it will be ran against the machine your actually running the script from.
|
|