python - Windows错误 : [Error 740] The requested operation requires elevation even after disabling UAC

标签 python windows-8 uac elevation

我已禁用 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/

相关文章:

python - 如何从亚马逊 s3 存储桶中删除文件?

Linux 上的 Python 远程连接到 Windows PC 以检索文件

javascript - 删除 WinJS ListView 中所有项目的最快方法是什么?

c# - 允许连接到完整性级别不匹配的 .NET COM 服务器

visual-studio - 如何删除/停止 Visual Studio 2013 以管理员身份运行?

Python 3.x : enter one list as multiple parameters in a function

python - Django 模型不会保存

c# - 在 Windows 8 应用程序中使用 HttpClient 的并行 HTTPRequest

java - 如何在 Java Swing 编程中创建 Windows 8 FLAT 原生外观?

c# - 在没有 ShellExecute 的情况下使用 UAC 提升进程权限