简体   繁体   English

具有cx-freeze / python脚本的Vista用户访问控制

[英]Vista User Access Controls with cx-freeze/python script

I'm trying to build a python script and freeze it with cx-freeze but with Vista User Access Control support. 我正在尝试构建python脚本,并使用cx-freeze冻结它,但具有Vista用户访问控制支持。

As it stands my script runs fine under Server 2003/Win XP, however I need to be able to write files into the root of a drive which requires elevated privileges under UAC. 就目前而言,我的脚本在Server 2003 / Win XP下运行良好,但是我需要能够将文件写入驱动器的根目录,而该驱动器在UAC下需要提升的特权。

My compiled script is then executed by another process (scheduling engine) which runs my script under a service account (with local Admin + domain admin rights) however because I don't have a manifest(?) and UAC is enabled, my script will always return permission denied errors. 然后,我的编译脚本由另一个进程(调度引擎)执行,该进程在服务帐户(具有本地Admin +域管理员权限)下运行我的脚本,但是由于我没有manifest(?)并且启用了UAC,因此我的脚本将总是返回权限被拒绝的错误。

Py2exe seems to have a solution for Vista UAC, however I am using cx-freeze with Python 3.1 because of requirements on new code in python 3.1 that I call. Py2exe似乎有适用于Vista UAC的解决方案,但是由于我对python 3.1中新代码的要求,因此我将cx-freeze与Python 3.1一起使用。

Is there a solution to this (apart from disabling UAC which I can't get approved) for cx-freeze? 是否有针对cx冻结的解决方案(除了禁用我无法批准的UAC)?

According to Python documentation UAC is automatically supported from version 2.6. 根据Python文档,从2.6版开始自动支持UAC。

See http://docs.python.org/distutils/builtdist.html . 参见http://docs.python.org/distutils/builtdist.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM