I am trying to run a .py script with the Runas command but I get the following error:
193: C:tempmodule1.py is not a valid Win32 application.
My command is:
runas /user:domainusername "C:tempmodule1.py"
I am unsure why this error is being thrown and every SO post I have read has not helped.
What exactly does this message mean and how could I resolve it?
3
I have no experience with runas, but based on your current command,
Try either
runas /user:domainusername python "C:tempmodule1.py"
Or
runas /user:domainusername /path/to/python.exe "C:tempmodule1.py"
Make sure you have installed python.
@john-gordon speaks correctly. Alternatively, if you won’t use Python interpreter, you may use pyinstaller for building standalone executable with pyinstaller -F your_python_script.py
command after installation it.