I am trying to run a python script on a remote computer via psexec. I am able to connect and run python.exe with the following:
C: est>psexec \192.168.X.X -u domainadministrator -p password -i C:Anacondapython.exe
The path to python.exe is the path on the remote machine. This opens a python window on the remote machine - all good.
I want to now pass a python script from the host machine to run on the remote. This script is on the host machine in C: est est.py. I tried
psexec \192.168.X.X -u domainadministrator -p password -i "C:Anacondapython.exe" -c C: est est.py
and get:
C:Anacondapython.exe exited on 192.168.X.X with error code 1.
I also tried-c test.py without the full path, and got a similar error. My thought is the remote application cannot find C: est est.py. I want to be able to pass the script from the host machine.
Any help is much appreciated. Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…