How to Sort the Registry Editor Favorites Menu?

The Favorites menu in the Registry Editor (Regedit.exe) is very useful especially if you’re someone who loves playing with the Registry Editor all the time. If you’ve noticed, the favorites menu in Regedit doesn’t have an option to sort the entries alphabetically. If you have many entries in the favorites menu, finding an item from the unsorted listing is a minor inconvenience.

Registry Editor favorites are displayed in chronological order, although the date and time stamp meta data aren’t shown in the user interface. If you export a key to a text file (instead of .reg format), the date/time stamp in shown in that text file, and that too the Last Write Time is shown only at the "key" level, and not for the individual "values". And in Regedit, there is no "Sort by Name" option, which is available in Internet Explorer Favorites menu. The Regedit favorites are stored in this registry path:


To sort the Registry Editor Favorites alphabetically, you can use one of the following methods.

Export to a REG file and Sort the Values Manually

In Regedit.exe, export the above key to a .REG file, and then delete the Favorites branch. In the exported REG file, the values are listed exactly as shown in the Favorites menu – so you need to sort it manually. Edit the REG file using Notepad and sort the values manually, save the file and double-click the file to run it. This rewrites the values, but this time adds entries in alphabetical order.

Export to a REG file and Use Sort command in Command Prompt

After exporting the above key to a .REG file, say D:\unsorted.reg, open a Command Prompt window and type:


This sorts the REG file contents, including the Windows Registry Editor Version 5.00 and the branch name. After sorting, open the Sorted.reg file using Notepad, and move the following header information to the top of the file.

Windows Registry Editor Version 5.00

Also, add the following line in the middle, which clears the existing Favorites branch in the Registry Editor. This is important.


So these three lines are at the top most in the sorted.reg file:

Windows Registry Editor Version 5.00

Save the file unsorted.reg, and double-click to run it. This sorts the Regedit Favorites menu.

Using RegScanner to get the sorted listings in a .REG file

RegScanner from Nirsoft is a nice utility that lets you find registry data with specified search criteria, and display them in one list. The list can be exported to a .REG file.

In RegScanner’s Scan Options page, type regedit\favorites in Find String, and set it to scan only the HKEY_CURRENT_USER hive. When the scan results are shown, sort the results by Name column in reverse alphabetical order. From the File menu, click Export and save to a REG file.

(For some reason, if the listing is in alphabetical order, RegScanner v exports the values in reverse alphabetical order in the REG file, and vice-versa.)

You get the alpha-sorted list.

Important: Before running the REG file, the existing Favorites branch in the Registry Editor has to be deleted.

(Unsorted vs. Sorted Favorites menu)

You may script this task (which should be pretty easy) if you want to do the alpha-sort in a single mouse click.

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.

Leave a Comment