Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WindowsError: [Error 740] The requested operation requires elevation even after disabling UAC

I have disabled UAC and running my script in python.

command = "abcd.exe"
subprocess.Popen(command,stdout=subprocess.PIPE,stderr=subprocess.PIPE).communicate()

Also, I set the application abcd.exe from its property to run as admin.

Then I'm getting the following error:

WindowsError: [Error 740] The requested operation requires elevation

like image 784
Binoy Avatar asked Dec 12 '22 17:12

Binoy


1 Answers

You could try using:

subprocess.call(["abcd.exe"], shell=True)

Basically the important part here is shell=True; if set to False, then you will get the following error.

WindowsError: [Error 740]

like image 103
kfc.w.f. Avatar answered Apr 27 '23 16:04

kfc.w.f.