1

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

Stefan Olsson
  • 617
  • 3
  • 16
  • 32

2 Answers2

2

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

Cosmin
  • 21,216
  • 5
  • 45
  • 60
2

It worked in somewhat if I

1) Unclicked "Enable ClickOnce security settings

2) Changed

<requestedExecutionLevel  level="asInvoker" uiAccess="false" />

into

<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />

But Every time the user starts, the user is asked if the user allow to run the "untrusted" application which is not so nice.

/Stefan

Stefan Olsson
  • 617
  • 3
  • 16
  • 32
  • So my answer helped. The untrusted application message is shown because your application is not digitally signed. You can purchase a code signing certificate and sign your application if you want to avoid it. – Cosmin Sep 21 '11 at 14:43