Kredns
Kredns

Reputation: 37221

How to keep the windows install dialog from popping up in .NET?

When a user installs my application how do I keep User Account Control from producing this dialog? And no I don't want to tell them to disable UAC.


(source: netron.com)

Upvotes: 1

Views: 357

Answers (4)

Jeffrey Hantin
Jeffrey Hantin

Reputation: 36524

You'd need to design your installation such that it doesn't require administrative access to install, which essentially means that you'll need to install inside the user's home directory instead of ProgramFilesDir and write registry entries only to HKEY_CURRENT_USER. For more details on how do this with a .MSI package, see this article. Inno Setup also has some details on limited user installs.

I don't think Visual Studio's setup project builder is capable of producing packages that don't require administrator rights to install. In any case, Vista seems to assume that anything that looks like a Setup.exe needs elevation (and results in the prompt).

Code signing will not remove the prompt, it will only make it say "Program XYZ from Developer Name wants access to your computer" instead of "An unknown program wants access to your computer".

Upvotes: 6

Jesse Smith
Jesse Smith

Reputation: 380

You need a code signing digital certificate from a certificate authority like Comodo or VeriSign. It's debatable how useful it is, though, because it only replaces this scary-looking warning with a slightly less scary warning (yellow alert vs red alert) that says "Publisher: " instead of "Unidentified Publisher" and still tells the user only to run it if they trust you.

I'm somewhat doubtful that the average user really notices the difference between the two warnings.

Upvotes: 2

hmcclungiii
hmcclungiii

Reputation: 1805

User Account Control, as it says at the bottom of the dialog, but you don't want to do. No other way. Either that or get it signed/certified? :)

Upvotes: 0

myforwik
myforwik

Reputation:

Your application would need to be certified by microsoft.

Upvotes: 0

Related Questions