Click-once application as Administrator

I created a ClickOnce application that had to modify the registry.

You can’t do this unless you’re an administrator.

I first tried to add an app.manifest file to elevate the application, but ClickOnce won’t anything but asInvoker.

Then through some googling I found the following article:

In summation, when your application starts, it checks if you’re an administrator with administrative priviledges.  If not, it relaunches itself as yourself (who should be an administrator) and terminates.

Posted in Development Tagged with: ,

Leave a Reply

Your email address will not be published. Required fields are marked *