I am trying to create an installer for a program that uses the pywin32 bindings to edit some excel spreadsheets. I have created an executable using py2exe and everything works when running the executable out of a folder on the desktop. However, I wish to be able to distribute a single installer file that will install the program into C:\Program Files\ or equivalent folder on whatever system. I have also succeeded in this, however, when the pywin32 bindings are used they create temporary files wherever the working directory is.
This is highly problematic as newer versions of windows have made it so only administrators have permission to write to these directories. Because of this when the app is run from these directories it fails with the error:
WindowsError: [Error 5] Access is denied: 'C:\\Program Files (x86)\\DataPlotter\\.\\win32com\\gen_py\
\00020813-0000-0000-C000-000000000046x0x1x6'
Changing the app to run with administrator permissions is a bad solution as it can introduce vulnerabilities.
Does anybody know of a fix to this problem or how to change the location that the pywin32 bindings use as a temporary file location.