Most users customize the right-click menu by adding additional verbs in the registry in order to launch programs or scripts. Windows 7 lets you add the UAC Shield icon for static context menu items as well. If a verb you add to the right-click menu launches a program which runs elevated by default, then it’s a good idea to add the UAC shield icon so that users know that the task requires elevation.

For example, take the case of .REG files (aka Registration Entries). When you right-click on a .REG file, you’ll see the "Merge" command which launches Regedit.exe (always runs elevated) and takes the file name as parameter. So let’s add an UAC icon to the Merge command for REG file type, as it runs Regedit.exe elevated.

By creating a registry value named HasLUAShield (of type REG_SZ) on the static verb, you can add the UAC shield icon to the corresponding item in the right-click menu. Use these steps:

Click Start, type Regedit.exe

Navigate to the following branch:

HKEY_CLASSES_ROOT \ regfile \ shell \ open

In the right-pane, create a String Value (REG_SZ) named HasLUAShield

Exit the Registry Editor.

Right-click on a .REG file, and you’ll see the UAC shield icon for the Merge command.

Related Posts


Email SubscriptionPrefer an E-mail subscription?

Enter your email address:

Delivered by FeedBurner

2 Comments

  1. said this on Friday, February 5th 2010 8:23 pm

    Thanks, Richard. I’ve fixed it.

  2. Richard
    said this on Friday, February 5th 2010 2:45 pm

    Thanks for this , found a small error though :

    RegKey should be HKEY_CLASSES_ROOT \ regfile \ SHELL \ open , not HKEY_CLASSES_ROOT \ regfile \ open

    No biggie , the pic has it right :)

    Cheers.

Leave a Reply