Issue
When someone downloads my program they get a .py
file and another file.
I want the .py
file to move the other file to that person's Program Files
folder but I get a Permission denied
error.
I can't get it to work.
import os
import glob
import shutil
files = glob.glob("Effects/*")
for f in files:
shutil.copy(f, "C:/Program Files/Project/Output/")
The Error:
PermissionError: [Errno 13] Permission denied: 'C:/Program Files/Projects/Output\\Output.txt'
I am trying to get admin privileges.
I use python 3.8.5
Solution
I found the solution
When converting the .py
file to an .exe
file with PyInstaller
, use the option
-uac=admin
Thanks to @mogi
Answered By - Frostbite Answer Checked By - Gilberto Lyons (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.