补助计划更多的访问 [英] grant program more access

查看:130
本文介绍了补助计划更多的访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么办法给予我的软件完全访问它在 Program Files文件,当我运行Windows Vista或Windows 7,并启用UAC?

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 delete it's files in Program File!

关于

推荐答案

在程序文件夹写作是不好的编程习惯,那就是微软提出这么难做到的原因。一旦程序已经成立,除非它正在修补它应该从来没有接触Program Files目录。如果您需要保存的数据应该被写入到文件夹

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");

这篇关于补助计划更多的访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆