5
votes

I need to create an executable for windows 8.1 and lower, so I tried Py2Exe (no success) and then PyInstaller, and damn it, it worked. Now I need to run it as admin (everytime since that uses admin tasks). My actual compiling script looks like this : python pyinstaller.py --onefile --noconsole --icon=C:\Python27\my_distrib\ico_name --name=app_name C:\Python27\my_distrib\script.py Is there an option to use UAC or things like this ? (its mess to me)

Also, everytime I start it on my laptop windows 8.1 (my desktop computer is windows 7) it says that is dangerous... Anything to make it a "trust" exe? Thanks in advance

1
I believe the trust level is more tied to the location rather than the application itself. And to get an application to request admin rights, you need to add a manifest that specifies it or rename your app to "setup.exe". - Mark Ransom

1 Answers

15
votes

PyInstaller 3.0 includes the --uac-admin option!