I'm calling subprocess.run to execute an external program outside. However the program requires administrative rights, I run the program using administrator but the python console prompts me for a password, but doesn't let me input the password and exits the program.
I've tried using subprocess.popen and subprocess.call, I've also tried running the program without administrative rights but pycharm will throw me a operation requires elevation error.
def runExecutables():
directory = r"C:\Users\Billy\Desktop\SURVEY_PROGRAM_WINDOWS_ENGLISH.exe"
#subprocess.Popen(directory)
subprocess.run(['runas', '/user:Administrator', directory])
#prog.stdin.write(b'password')
#prog.communicate()
I should be expecting, either the executable to run, or a prompt that pops up asking for the password to be inputted, proving to me that the executable is indeed being run. I am just getting a python prompt to enter the pass for administrator and it does not wait for me to enter the password before finishing the process.