Why Am I Getting Windowserror: [error 5] Access Is Denied?
Trying to create program that adds folders into program files-recieving this error: WindowsError: [Error 5] Access is denied 'C:\\Program Files\\IMP' Here is my code import os, s
Solution 1:
Because you have to have the "system administrator privileges" to create dirs under C:\Program Files
.
So try run the script with system administrators privilege.
To start a command prompt as an administrator
- Click Start.
- In the Start Search box, type
cmd
, and then press CTRL+SHIFT+ENTER. - Run the python script.
Solution 2:
Right click on file (which file/folder's permissions needed to execute the script) go properties, security and enable all permissions, little checkboxes -> ALLOW: "every application package & limited application package & trusted installer"
this is it :)
Post a Comment for "Why Am I Getting Windowserror: [error 5] Access Is Denied?"