在没有管理员特权的情况下使用.NET Framework部署应用程序 [英] Deploying application with .NET framework without admin privileges

查看:82
本文介绍了在没有管理员特权的情况下使用.NET Framework部署应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

免责声明:如果此问题不属于SO,请留下提示以将其移至何处.

Disclaimer: If this question does not belong on SO, please leave a hint where to move it.

大家好,

我工作的公司开发了一个应用程序,该应用程序随着时间的推移积累了很多依赖项:

the company I work for has developed an application that has accumulated a bunch of dependencies over time:

  • 带有更新的.NET 3.5
  • 带有更新的.NET 4.0
  • VC ++ Redist 2010
  • VC ++ Redist 2013
  • VC ++ Redist 2015
  • 我们专有的设备驱动程序

然后将所有内容打包到Inno Setup可执行文件中,并分发给客户端.最近,已经指出了对自动更新机制的需求,这导致我们遇到特权问题.这是我需要满足的一些产品需求(无法弄清楚如何做到):

Everything was then packaged into an Inno Setup executable and distributed to the clients. Recently, the need for an auto-update mechanism has been pointed out, which causes us to run into privilege problems. Here are some of the product demands I need to meet (and cannot figure out how):

  • 安装程序(和产品)必须支持旧版硬件和软件(读为Windows XP及更高版本)
  • 安装(包括自动更新安装)可能只需要一次管理员登录(第一次安装期间).这意味着自动更新安装程序必须能够在非管理员帐户下静默运行.
  • 安装程序应安装到{commonappdata}文件夹(已锁定),并且最终应用程序应具有相同的行为
  • 依赖关系必须包含在应用程序安装程序中.它们不需要包含在自动更新安装程序中.

乍看之下,这似乎微不足道,但是我尝试的每种组合都会在安装过程中或更新时遇到访问被拒绝"消息.有人知道这样做的可靠方法吗?

This may seem trivial at first glance, but every combination I try, I run into the "access denied" message either during installation or at update time. Does anyone know of a reliable way to do this?

推荐答案

没有管理员权限,您将无法更新安装到仅管理员文件夹的应用程序.

You cannot update an application installed to Administrator-only folder without Administrator privileges.

实施此类应用程序自动更新的唯一方法是实施Windows Update,Mozilla维护服务,Google Chrome海拔服务,Adobe Acrobat Update Service和类似服务的功能:

The only way to implement an auto update of such application is to implement, what Windows Update, Mozilla Maintenance Service, Google Chrome Elevation Service, Adobe Acrobat Update Service and similar services do:

  • 在第一次具有管理员权限的安装中,请安装具有管理员权限的服务.
  • 让服务本身定期检查更新并开始自动更新;
  • 或者如果您需要触发更新,则为该服务实现一个API(有人可以在没有管理员权限的情况下运行应用程序本身)来触发自动更新.

将具有管理员权限的服务安装到客户端系统是一个严重的违规行为.因此,如果您决定这样做,请确保正确执行200%,不要在客户端系统中引入漏洞.

相关问题:

这篇关于在没有管理员特权的情况下使用.NET Framework部署应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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