Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone
I developed a program but when I run my application on windows 7, I get user access denied since I read a file in "Volume C", When I run as an administrator, it is ok.
Please [tell me] how to solve this. Any help will be appreciated.
Posted
Updated 24-Mar-12 1:16am
v3

1 solution

With UAC, just because you are logged in as a user with administrator privileges does not mean a program actually runs with them. The program has to either request privilege elevation (which gives the "Do you want to allow this program to _" UAC pop-up) or explicitly be run as administrator (right-click on the program/shortcut and choose Run as Administrator).

By default most areas of the drive outside of the standard "user files" (a.k.a. My Documents & co.) are restricted to administrator-only access, but the folder permissions can be changed to add access for a particular user if desired.
 
Share this answer
 
v2
Comments
Shahin Khorshidnia 24-Mar-12 7:16am    
My +5
fjdiewornncalwe 4-Apr-13 15:40pm    
Plagiarized: source

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900