B
B
bitkoljas2021-01-31 01:46:49
Python
bitkoljas, 2021-01-31 01:46:49

How to run an external program as a different Python 3 Windows user?

Tell me, run an external file from a Python script without manual input and any confirmation.
For example, in the script, immediately write Username Password and address to the program, after which the program would start on behalf of this user.
os.system("runas /savecred /user:User 'C:\\test.exe") - not suitable as it requires manual password entry for the user.
I need the script to do everything automatically

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor T2, 2021-01-31
@bitkoljas

psexec (+subprocess)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question