The setup installation creates an executable with a UAC shield, which requires permission elevation.

64 views
Skip to first unread message

Wojtek

unread,
Oct 28, 2024, 7:16:18 AMOct 28
to innosetup

I’m encountering a strange issue and hope someone can shed light on it.

I have an Inno Setup installer that creates application files in: C:\ProgramData\Company\SoftwareName. There are two executable files:

  1. The main executable (without a manifest) runs without any issues.
  2. A second executable, with a manifest set to run as "Invoker," displays a UAC shield icon.

This second executable, named starter.exe, requires elevated permissions to launch.

If I:

  1. Change the name of starter.exe to anything else, the UAC shield disappears.
  2. Move the file to any other directory, the UAC shield also disappears.
  3. Place a simple “Hello World” console application in that directory named starter.exe, the UAC shield still appears.

According to Microsoft, if a manifest is present, the file should follow the manifest’s instructions rather than be evaluated based on heuristics (e.g., filename patterns like "installer," "update," "setup").

I managed to work around this by installing a Windows shim for the file using Compatibility Administrator, but I still don’t understand the underlying cause of this behavior.

Furthermore, this behavior isn’t consistent across all computers—only some. I read that the system might build an internal database to help evaluate executables for elevation.

Is there anything I can do to address this?

Jernej Simončič

unread,
Oct 28, 2024, 10:06:11 AMOct 28
to Wojtek on [innosetup]

On Monday, October 28, 2024, 08:56:17, Wojtek wrote:


Is there anything I can do to address this?

Check the compatibility options on the executable – it looks like the "Run program as Administrator" compat option is set for that specific path.

 

-- 
< Jernej Simončič ><><><><>< https://eternallybored.org/ >


Clothes make the man. Naked people have little or no influence on society.
       -- Haberdasher's Instruction

Wojtek

unread,
Oct 28, 2024, 10:12:30 AMOct 28
to innosetup
Hey, thanks for the answer! The problem is that it’s not checked there. Selecting that option doesn’t show a shield on the icon, and the shield icon is placed over it. 

Gavin Lambert

unread,
Oct 29, 2024, 12:46:28 AMOct 29
to innosetup
On Tuesday, October 29, 2024 at 12:16:18 AM UTC+13 Wojtek wrote:

I have an Inno Setup installer that creates application files in: C:\ProgramData\Company\SoftwareName. There are two executable files:

I'm not sure if this is related to your issues, but that's not an appropriate place to install software to.

Software should either be installed under {pf} (typically C:\Program Files, which requires admin permissions), or under {userpf} (typically C:\Users\username\AppData\Local\Programs, which requires non-admin permissions).  You can use {autopf} to automatically select between these depending on the actual permissions.  Other locations should only be used at explicit user request.
Reply all
Reply to author
Forward
0 new messages