How does Windows 7 know to add the UAC shield to some shortcuts? I used to have to tell the program to run as an administrator. But now that same shortcut has the yellow and blue UAC shield icon on it.

How does it know to run my program as an administrator? Is there some registry key?

alt text

2 Answers 2


There are a few ways it can know. Generally it will put the UAC icon there anytime clicking the icon will result in a UAC prompt confirmation. However, you may not always see it because after a recent change, the icon cache won't immediately be updated.

The ways it knowns:

  1. It knows because you modify the shortcut, or the application compatibility properties,or
  2. because the application has alerted the OS that it requires admin priviledge.

What you are probably seeing... In the shortcut properties "advanced..." button dialog, choosing run as administrator will make the sheild appear (after your icon cache is refreshed.) The same thing with "run as administrator" setting on the compatibility tab. (again, after the icon cache is refreshed.) How to force a refresh of your icon cache in windows 7, you ask? I'm not sure... a reboot should do it.)

Windows can also know to put the UAC icon there to begin with because an app that is "ready" for (is programmed to behave well with) UAC, can let the OS know that it needs admin permissions, this can be done through a "manifest" that is embeded into the exe.


As DanO has mentioned, there are several ways to get an UAC shield icon displayed. Some that I know for certain:

  • If an application is UAC-aware, a developer can put this icon in manually, but the icon will be always the same.
  • If an application is UAC-aware, a developer can put user rights elevation flag in application's manifest. In this case shield icon will appear automatically when user rights elevation is required.
  • Even if an application is not UAC-aware, user rights elevation may be triggered based on executable file name. File name should contain "setup", "install" or "update" word.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.