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?