How do I get access to create a file in C:\Program Files in Python? I have compiled my program to exe.
My console is showing:
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC
v.1914 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> fl = open('C:\\Program files\\example.example', 'w')
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
fl = open('C:\\Program files\\example.example', 'w')
PermissionError: [Errno 13] Permission denied: 'C:\\Program files\\example.example'
I mean that how can I create a file in there? Or how can I get permission as a admin? Without right clicking and selecting run as admin? Like other applications do?