Search code examples
visual-studioinstallationadminrights

Visual studio 2010 setup project Admin rights


Visual studio 2010, Windows XP/7

I am not sure if I am doing right here but I have an application project with a (visual studio) Setup project.

I have configured it so that install the application into

[ProgramFilesFolder][Manufacturer]\[ProductName]

but after each installation I have to manually change the rights of the .exe so it will run with admin rights.

Is there a way of having the Setup installtion change this automatically so the user do not have to do this manually ?

Do i have to mess around with signature as stuff, that is buying a signature from verisign ?

Is it "nowdays" (in Windows 7) wrong to install a customer application into

[ProgramFilesFolder][Manufacturer]\[ProductName]

and should instead be installed into

[AppDataFolder][Manufacturer]\[ProductName]

or somewhere else ?

/Stefan


Solution

  • The recommended solution is to add a manifest to your application which requests elevation: http://msdn.microsoft.com/en-us/library/bb756929.aspx