我禁用了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
Tags:
您可以尝试使用:
基本上这里的重要部分是
shell=True
;如果设置为False,则会得到以下错误。我认为问题在于使用subprocess.Popen。
我也认为你的问题已经在这里得到了回答: Request UAC elevation from within a Python script?
相关问题 更多 >
编程相关推荐