我已禁用UAC并在python中运行我的脚本.command = abcd.exesubprocess.Popen(command,stdout=subprocess.PIPE,stderr=subprocess.PIPE).communicate()另外,我将应用程序abcd.exe从其属性设置为以admin身份运行.然...

我已禁用UAC并在python中运行我的脚本.
command = "abcd.exe"
subprocess.Popen(command,stdout=subprocess.PIPE,stderr=subprocess.PIPE).communicate()
另外,我将应用程序abcd.exe从其属性设置为以admin身份运行.
然后我收到以下错误:
WindowsError: [Error 740] The requested operation requires elevation
解决方法:
您可以尝试使用:
subprocess.call(["abcd.exe"], shell=True)
基本上这里重要的部分是shell = True;如果设置为False,则会出现以下错误.
WindowsError: [Error 740]
沃梦达教程
本文标题为:python – WindowsError:[错误740]即使在禁用UAC后,请求的操作也需要提升


基础教程推荐
猜你喜欢
- Python:忽略后台进程中的信号 2023-11-12
- 您如何在Linux中的Python中播放ogg文件? 2023-11-15
- centos7安装python3 以及tab补全功能 2023-09-03
- 如何在Windows 7和admin上使用Python执行cmd命令 2023-11-13
- YOLOv5改进系列之增加小目标检测层 2022-10-20
- python sys模块使用方法介绍 2022-09-03
- 使用 OpenCV-Python 识别答题卡判卷功能 2023-08-08
- Django利用LogEntry生成历史操作实战记录 2023-08-09
- 在windows上解决Command "python setup.py egg_info" fail 2023-09-03
- CentOS7.4 安装Python3.5 2023-09-03