In the previous post on the topic of the Registry Editor’s favourites menu, Andrew Higginbotham was kind enough to point out that there was also an easy way to export the favourites from one machine and import to another. Since its always good to show how to arrive at a solution, let’s breakdown the process of finding out where this data is squirreled.
As always we can use the venerable Sysinternals Process Monitor to tell us where the Registry Editor is saving the Favourites data.
Brother, Where Art Thou?
To ensure that we do not capture a load of useless data, we can set a filter in Process Monitor to only show us what regedit.exe is doing. Click on the filter icon, or use the shortcut of Ctrl + L.
In the process Monitor Filter Window add a new filter for process name is regedit.exe
Click Add, and the regedit.exe process is added
Clear any existing data with Ctrl + X and then make sure the capture is running when we add a test favourite.
We should then see that the favourites are stored under
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit\Favorites
This is shown below in the capture:
On that line in Process Monitor,right click the entry and choose “Jump to” or use Ctrl + J to scoot directly to the registry location where the data is stored.
We can also use another neat shortcut to copy the registry path to avoid typos! Right click the key, and select Copy key name:
We can export the registry data from here to a .reg file, take that to another server and import it, but let’s automate this!
Automated Export
Let’s use reg.exe to pull out the data:
REG.exe EXPORTHKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit\Favo
rites \\Consea-mb1\stuff\Favourites.reg
Please note that the above command may wrap and is one line. You will also note that it is saving the .reg file onto a UNC where we can write to. This can be your home folder or a share where multiple admins have access and you can all access the same shared favourites from to streamline your operational tasks.
Automated Import
To then load up our export file run
REG.exe IMPORT \\consea-mb1\stuff\favourites.reg
If you are super keen on the feature, go crazy and add it to your server build process
Cheers,
Rhoderick