我已禁用 UAC 并在 python 中运行我的脚本。
command = "abcd.exe"
subprocess.Popen(command,stdout=subprocess.PIPE,stderr=subprocess.PIPE).communicate()
此外,我从其属性中将应用程序 abcd.exe
设置为以管理员身份运行。
然后我收到以下错误:
WindowsError: [Error 740] The requested operation requires elevation
最佳答案
您可以尝试使用:
subprocess.call(["abcd.exe"], shell=True)
基本上这里重要的部分是shell=True
;如果设置为 False,那么您将收到以下错误。
WindowsError: [Error 740]
关于python - Windows错误 : [Error 740] The requested operation requires elevation even after disabling UAC,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15039137/