1

I am installing my software (myprog.exe) using inno setup and i would like to force users to launch myprog.exe as adminstrator but i cant figure out! my exe doesen't have the uac shield on the icon and it can be launch without "right click" - "run as administrator"

I have set PrivilegesRequired=admin for the installer but i just for the installation phase.

In fact i want to tell to windows "Hey my program is dangerous, allays ask to run it as administrator"

Any ideas?

zeraDev
  • 381
  • 1
  • 3
  • 16
  • possible duplicate of [How to change executable file using Inno Setup?](http://stackoverflow.com/questions/11773921/how-to-change-executable-file-using-inno-setup) – TLama Sep 04 '12 at 16:47

1 Answers1

5

The application itself (myprog.exe) should be built with a manifest to specify that it needs administrator privileges. See http://msdn.microsoft.com/en-us/library/windows/desktop/bb756929.aspx

Thus the app manifest must contain the following element:

<requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
Alexey Ivanov
  • 11,541
  • 4
  • 39
  • 68
Mark Ransom
  • 299,747
  • 42
  • 398
  • 622
  • Great! so i found a post that explain how to do it with Inno setup. http://stackoverflow.com/questions/258728/request-admin-privileges-for-java-app-on-windows-vista – zeraDev Sep 05 '12 at 07:40