slfan
slfan

Reputation: 9129

Update software without admin rights and access the registry

I have a .NET application that still uses the registry. I would now like to do updates without the user being administrator and without changing the group policy object. During the update process I need access to the registry. The initial installation of the application can be done by an admin.

Is there any possibility to achieve this goal? Could I use a certifcate for this?

Upvotes: 2

Views: 10679

Answers (2)

Scott Chamberlain
Scott Chamberlain

Reputation: 127543

It may be too late but if you can do one last administrative update you can set the permissions on the registry key via RegistryKey.GetAccessControl, set write access to the key, then use RegistryKey.SetAccessControl to save the setting (This will require admin privs the first time you try to do it)

Upvotes: 1

user180326
user180326

Reputation:

Given the requirement to write to the HKLM registry, the answer is no ....

... unless it can be pushed as an update by the domain administrator. You will need to package your installer in a format that the admin can push (I would guess a .msi or .msp). I don't think it is technically a requirement to sign your msi's.

You could also change to a per user install (a la Chrome), but if I understand the question correctly it is too late for that.

I'm no real expert when it comes to deployment, but writing to HKLM (or the Program files folder) requires admin privileges, that's for sure. A nasty trick around this would be to install your own updater that runs as admin, and updates on the user's behalf. But don't, it's a security accident waiting too happen.

Upvotes: 1

Related Questions