I am trying to control a remote Python script, which reads commands from stdin, via psexec 1.98, but I need to redirect psexec's input since psexec itself will be launched from another program. However, I have no luck making psexec accept redirected input. Is it supposed to work at all?
An example of what I'm trying to do, where input is a file containing input to the remote script:
psexec \\mymachine python c:\script.py < input
The issue is that it thinks that "...script.py" is the end of your command. If you put quotes around it
Then you should be fine.
Additionally, you'll probably need to specify an absolute path to that input file.
Two examples:
That should do it for you.
What about these:
psexec \\mymachine cmd /c "python "c:\script.py < input"
-or-
psexec \\mymachine cmd /k "python "c:\script.py < input"