0

I've successfully added elevation to my pyinstaller-generated exe by using uac_admin=True in the spec file. https://pyinstaller.org/en/stable/man/pyi-makespec.html?highlight=uac-admin#windows-specific-options

However, within folders created by the exe, one needs admin permission to create additional files and folders, while this is not true for the parent folder not generated by pyinstaller. I've tried the method described here: https://stackoverflow.com/a/12168268/1957737 To set the permissions of all of the subfolders to the permissions of the parent folder. That seemed to work when running the code as admin, but doesn't have any effect when running the pyinstaller exe - the folders still require admin permission to write to.

To clarify:

d:\parent - the parent folder

d:\parent\generated - a folder generated by pyinstaller

creating files and folders in d:\parent does not require admin

creating files and folders in d:\parent\generated does require admin

Thanks for any help.

SigmaGamma
  • 19
  • 5

0 Answers0