Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

i have a problem with starting an .exe.exe file as administrator rights..

I also tried:

subprocess.call(['runas', '/user:Administrator', 'myfile.exe'])

But then i have to enter a password..

Is there any chance to leave that out?


PS: I searched now for some hours... didn't find anything!

share|improve this question
Why would you remove the password? –  Diblo Dk Jul 4 '13 at 18:25
You could use an stdin PIPE to send it, but then you need to store it somehow accessible to your Python script. That looks like proc = subprocess.call(['runas','/user:Administrator','myfile.exe'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) Then you could do proc.stdin.write('password\r\n'). –  nerdwaller Jul 4 '13 at 18:28
@nerdwaller, I'm trying this for a while but without success. Are you sure this works? –  McLeary Feb 11 at 0:30
add comment

1 Answer

up vote 1 down vote accepted

The only way I know from what you say, is to use "Application Compatibility Toolkit" http://www.microsoft.com/downloads/details.aspx?FamilyId=24DA89E9-B581-47B0-B45E-492DD6DA2971&displaylang=en

And how to use it: http://blogs.techrepublic.com.com/window-on-windows/?p=635

Source: Can you turn off UAC for a single app?

share|improve this answer
Thanks alot, it worked :) –  Astraioz Jul 4 '13 at 20:17
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.