1

I have written a simple program.

Recently I found that when giving it a name including update as its substring (case insensitive), the file automatically gets a Windows shield/buckler on it in Windows Explorer.

In the following image, all files are identical except for different file names:

enter image description here

I was wondering if this is because there is a UAC Shield/Buckler Appendage Mechanism in Windows Explorer and its backend parts.

Any suggestions and clues are appreciated.

harrymc
  • 455,459
  • 31
  • 526
  • 924
Steven Liang
  • 160
  • 5

1 Answers1

1

Adding a manifest file is the solution.

Due to the Installer Detection Technology of UAC, a UAC shield icon will be displayed on your 32-bit executable file with no requestedExecutionLevel in the manifest, but with keywords like “install”, “setup”, “update” etc in the filename. With the UAC shield icon, if we launch the executable file, the UAC elevation dialog will pop up.

Source

The manifest should contain a requestedExecutionLevel. Here is an example of a partial manifest file:

 <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel
          level="asInvoker"
          uiAccess="false"/>
        </requestedPrivileges>
    </security>
  </trustInfo>

See here for more info.

Glorfindel
  • 4,089
  • 8
  • 24
  • 37
Gantendo
  • 4,615
  • 1
  • 18
  • 30
  • More info https://docs.microsoft.com/en-us/windows/security/identity-protection/user-account-control/how-user-account-control-works – user1292580 Sep 19 '21 at 06:23
  • 1
    I tried with a simple external manifest file with a [help link](https://docs.microsoft.com/en-us/windows/win32/sysinfo/targeting-your-application-at-windows-8-1) and it indeed affects the UAC buckler showing behavior. Thanks a million! – Steven Liang Sep 19 '21 at 07:20