0

I am trying to run a .vbscript remotely via psexec. Even with switches like -u -p -s -c, I am getting errors. Here is what I've tried:

1.)

psexec  -u user@domain -p password -s \\computer  "\\uncpath\file.vbs"

"access denied"

I have seen that to resolve this issue you can add reg key to host and reboot. This is not an option for me.

Next I tried the copy switch for localpath.

2.)

psexec  -u user@domain -p password  -s \\computer  -c "C:\localpath\file.vbs"
"The system cannot find the file specified" 

So how can I run a .vbs script via psexec?

Benjamin Jones
  • 326
  • 1
  • 9
  • 22

1 Answers1

1

Ok I figured it out.

  • Had to take out -s switch. -used cscript
  • used cscript /nologo switch.

    psexec -u user@domain -p password \\computer cscript /nologo "\uncpath\file.vbs"

Benjamin Jones
  • 326
  • 1
  • 9
  • 22