[Solved] Python get permission to write in program files. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

[Solved] Python get permission to write in program files.

I want to make an python installer that installs a program(It may or may not be made in python). I can later freeze it with pyinstaller, cx_Freeze, etc. I want to put the program data in Program Files, put a shortcut in the Start menu files location... The problem is that I don't have permission to write in Program Files. When you run other installers, windows creates a "Do you want to allow this app to make changes to your device?" dialogue. How to request Windows to get access to write in Program Files and not make the user run the program as an administrator?

20th Oct 2019, 12:11 PM
Arnesh
Arnesh - avatar
2 Answers
+ 1
Go to property of the installer. Then go to compatibility, then on the left corner "change settings for all users", then check the box with "open program with administrator permission" or so cuz my pc language is german. And now apply all changes, so every user will have to open it as admin.
20th Oct 2019, 5:12 PM
William M
William M - avatar