Click here to Skip to main content
15,890,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

My MFC application will try to save information to a file in c:/Program files/<myappname> folder. This works fine in XP, but facing access denied message in Win-7. How can i fix this.

Thanks,
Posted

1 solution

C:\Program Files and all folders below that have been restricted to Administrator access since Windows Vista.

You'll have to pick a different place or convince your users to let you run as Administrator.
 
Share this answer
 
Comments
codeprojectvijayanand 18-Oct-11 10:24am    
Thank you.
Albert Holguin 18-Oct-11 11:08am    
By the way, you can have your app automatically try to run as administrator... it should just prompt the user for permission... Although if the user doesn't have admin privileges it may be a problem.
Albert Holguin 18-Oct-11 10:53am    
Yep... that's a pain in the butt since Vista... +5

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