0

I 'm trying to remotely execute a perl script that needs to run with some arguments/switches, but I 'm failing miserably :p What I 'm currently doing is:

psexec \\computer -u my_username "path\to\perl" "path\to\perl_script" --switch1 --switch2

This fails. I 've tried the above with a couple of ways, playing with the quotes, but didn't manage so far. Any ideas?

u1686_grawity
  • 452,512
  • are switch1 and 2 switches for perl, or the script itself? are there any spaces in either of the paths your passing in? also you need to use \computer, instead of \computer. its a UNC path. – Frank Thomas Aug 03 '13 at 16:48

2 Answers2

1

Is the user a domain user or a local user of the remote computer "computer"?

This works for me with my windows domain credentials as a practical example:

psexec \\server01 -u mydomain\megamorf cmd /c "\\share\Software\Prezi\PreziDesktop4.2.1.exe /S /v/qb"
megamorf
  • 2,404
  • Thanks for the reply. The user is a domain user. Also, the switches I referred in my original post are for the perl script itself, not perl. I think I didn't clarify that. – George P Aug 04 '13 at 01:40
0

Finally, I managed to do my job like this:

psexec \\computer -u my_username -w "working\path" cmd /c "script"

Cheers! :)