2

I installed an application that only extracted the files without being really installed to the system so I created my own setup.exe. Now I wonder why there is no Admin sign in front of the .exe. This is what i get:

enter image description here
and this is what normally a Setup installer looks like:

enter image description here

I can't find the needed code on the Inno Setup website. I hope you can help me out what code I would have to add. (Yes I know I could just make another icon just for the setup but just adding some code would be much nicer. InstallForge does it automatically but Inno Setup just has better options for registry entries) Best Regards, Christian

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
Muddyblack k
  • 314
  • 3
  • 16

1 Answers1

3

Windows looks at the application manifest to determine if the executable requires UAC elevation.

Set the requestedExecutionLevel node in the manifest to requireAdministrator.

In Inno Setup you can set PrivilegesRequired to admin but that is already the default and it will not add the shield to current versions of Inno as far as I know.

If your installer is not signed you could perhaps use Resource Hacker to add/edit the manifest yourself.

Anders
  • 97,548
  • 12
  • 110
  • 164
  • 1
    You can add the manifest even if you want to sign the installer. You just have to sign it after adding the manifest only. + See [Inno Setup and the Windows UAC shield](https://stackoverflow.com/q/14499039/850848#50365233). – Martin Prikryl May 16 '21 at 06:06