JasonX
JasonX

Reputation: 543

Deploying application with .NET framework without admin privileges

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

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):

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?

Upvotes: 1

Views: 2446

Answers (1)

Martin Prikryl
Martin Prikryl

Reputation: 202088

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

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:

  • On the first installation with Administrator privileges, install a service with Administrator privileges.
  • Either have the service itself check regularly for updates and start the auto update;
  • Or if you need to trigger the update otherwise, implement an API for the service that someone (e.g. the application itself running without Administrator privileges) can call to trigger the auto update.

Installing a service with Administrator privileges to a client system is a huge breach. So if you decide to do that, make sure you do it 200% right, not to introduce security holes into the client's system.


Related questions:

Upvotes: 2

Related Questions