这需要在程序文件夹写自我更新.NET客户端应用程序 [英] Self-Updating .NET client application which needs to write in the Program File folder

查看:190
本文介绍了这需要在程序文件夹写自我更新.NET客户端应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

类似的: <一个href="http://stackoverflow.com/questions/17533/request-vista-uac-elevation-if-path-is-protected#17544">http://stackoverflow.com/questions/17533/request-vista-uac-elevation-if-path-is-protected#17544

我已经安装在c .NET客户端应用程序:\ Program Files文件(Windows Vista的)。该应用程序会自动更新,但它不是因为权限问题。自动更新应该只需更换一对夫妇的组件,但它们都位于C:\程序文件和应用程序会引发以下异常:

I have a .NET Client Application installed in c:\Program Files (Windows Vista). This application should update itself, but it doesn't because of permission issues. The auto-updater should simply replace a couple of assemblies, but they are all located under c:\Program File and the application throws the following exception:

System.UnauthorizedAccessException的:   访问路径C:\ PROGRAM   文件...被拒绝。

System.UnauthorizedAccessException: Access to the path 'C:\Program Files...' is denied.

我对那里的应用程序可以安装任何控制和权限。有什么解决方法吗?是否有可能要求管理员权限了几秒钟?是否有可能弹出一个UAC窗口?我是pretty的确保有一个解决方法......否则怎么火狐将能够自我更新?

I have no control on where the application could be installed and the permission. Is there any workaround for this? Is it possible to request the Administrator rights for a couple of seconds? Is it possible to pop a UAC window? I am pretty sure that there a workaround... Otherwise, how Firefox would be able to update itself?

在此先感谢您的帮助和想法!

Thanks in advance for the help and ideas!

推荐答案

你能不能使用点击一次部署方法?我们使用此为内部应用程序和用户没有权限问题,当我们发布一个新版本。它们会被提示安装更新时,启动应用程序(如果有新版本存在),并将其安装顺利。

Could you use a Click Once deployment method? We use this for an internal application and users have no problems with permissions when we publish a new version. They are prompted to install the update when they launch the app (if a new version exists) and it installs without a hitch.

这篇关于这需要在程序文件夹写自我更新.NET客户端应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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