开发者

grant program more access

Is there any way to grant My Software full access on it's folder in Program Files,When I run windows Vista or Windows 7 and UAC is enabled?

My application can not write or开发者_Go百科 delete it's files in Program File!

regards


Writing in the programs file folder is bad programming practice, that is the reason Microsoft made it so hard to do. Once the program has been set up it should never touch the program files directory unless it is being patched. If you need to save data it should be written to the folder

//Use this if you want different folder per user
Path.Combine(Environment.GetFolderPath( Environment.SpecialFolder.ApplicationData),"Your Application Name");

//Use this if you want the same folder per user
Path.Combine(Environment.GetFolderPath( Environment.SpecialFolder.CommonApplicationData),"Your Application Name");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜