1

Is it possible to run a vbscript remotely with psexec? Normally the field of psexec calls for an exe file, so can this be changed or manipulated to deal with a vbs file?

Ben
  • 33
  • 1
  • 2
  • 9

3 Answers3

2

Got it to work by making cscript.exe the command to use and then the vbs file is its argument. Fixed now. Thank you.

Ben
  • 33
  • 1
  • 2
  • 9
1

This post suggests it is:

icyrock.com
  • 1,190
  • 10
  • 17
  • I looked at that and still am a little confused. Will the csript exe be copied along with the vbscript to the remote machine? – Ben Nov 16 '10 at 18:58
  • cscript.exe is available in Windows by default: `c:\windows\system32\cscript.exe`. You should be able to run vbs like that: `cscript some.vbs` on any machine. – icyrock.com Nov 16 '10 at 19:02
-1
Psexec \\\remoteServer cscript c:\scripts\file.vbs
chicks
  • 3,793
  • 10
  • 27
  • 36
Arya
  • 1