1
votes

I'm trying to build a python script and freeze it with cx-freeze but with Vista User Access Control support.

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.

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.

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.

Is there a solution to this (apart from disabling UAC which I can't get approved) for cx-freeze?

1
Can't find a cx_freeze solution however did manage to use the "Configuring Pre-Windows Vista Applications for Compatibility with UAC" section @ technet.microsoft.com/en-us/library/cc709628(WS.10).aspx to identify what wasn't compatible and use workarounds .. (write to os.environ['TMP'] instead of C:\, etc.) - knda

1 Answers

1
votes

According to Python documentation UAC is automatically supported from version 2.6.

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