How to Add “Merge (as User)” Right-Click Menu Option for REG Files

When logged on to an administrator account in a Windows Vista or Windows 7 PC and attempt to merge a .REG file, you’ll see the User Account Control (UAC) prompt asking for your consent to allow the process to start. Regedit.exe uses the highestavailable execution level (as specified in its manifest) and thus it prompts for consent to launch with the highest available privilege.

There are situations where you’re logged on to an administrator account, and want to work on the registry stuff only applicable to the current user (user registry hive). In those cases, you may find the UAC consent prompt an annoyance, since you know you’re only merging per-user stuff onto the registry. As a tweaker myself, I do face this little annoyance, but use a workaround to merge .REG files.

The trick is to add a "Merge (as User)" option to the right-click menu for .REG files, which should run the console tool REG.EXE. Here is how to do that.

Add "Merge (as User)" Context Menu Option for .REG files

1. Launch Regedit.exe to open the Registry Editor

2. Navigate to the following key:

HKEY_CLASSES_ROOT \ regfile \ shell

3. Create a subkey named open2

4. Under open2, create another subkey named command

5. Select command, and assign the following data for the (default) value:

reg.exe import "%1"

Note: If you need to see the output window every time, use the following data instead:

cmd /k reg.exe import "%1"

6. Exit the Registry Editor.

Editor’s Note: If the .REG file has instructions to modify a system-wide branch (say, HKEY_LOCAL_MACHINE) the REG.EXE console tool (running as standard user) encounters an ACCESS DENIED error, but simply proceeds onto the next entry in the .REG file to carry out rest of the instructions. However, the output reads "ERROR: Error accessing the registry", indicating that one or more of the registry keys/values as specified in the .REG could not be updated.

One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support. It won't take more than 10 seconds of your time. The share buttons are right below. :)

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a consecutive ten-time recipient of the Microsoft Most Valuable Professional award in the Windows Shell/Desktop Experience category, from 2003 to 2012. He loves to troubleshoot and write about Windows. Ramesh founded in 2005.

3 thoughts on “How to Add “Merge (as User)” Right-Click Menu Option for REG Files”

  1. In Windows 7, I run as a non-Admin user and clicking on Merge in the context menu on .reg files, won’t enable a UAC prompt, when the reg file requires reading/writing to admin-only areas.

    Running regedit.exe requires NO elevation either. So maybe that’s the problem.

    Can you help?


Leave a Comment