O'Reilly logo

Windows XP in a Nutshell by Troy Mott, Tim O'Reilly, David A. Karp

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Exporting and Importing Registry Data with Patches

Hives have an arcane format, making direct editing all but futile. Fortunately, theRegistry Editor conveniently supports the importing and exporting of any number of keys and values with Registry patches. Patches (.reg files) are ordinary ASCII text files that can contain anything from a single key to a dump of the entire Registry.

Registry patches can be created with Registry Editor or a standard text editor, such as Notepad. You can also use Notepad to view and modify patches, and then use Registry Editor to reimport the patch.

Patches have many practical uses, including creating local backups of portions of the Registry as a preventative measure before editing keys (see the previous section). You can create a Registry key on one computer and apply it on another, useful for migrating a single setting or a whole group of settings to any number of Windows systems. Patches can allow easier editing than with Registry Editor, and certainly afford quicker and more flexible searches.

To create a Registry patch, highlight the key you want to export and select File Export. Once you’ve chosen a filename, the selected key, any subkeys, and all their values and respective data will be saved in a single file with the .reg extension. In most cases, you wouldn’t want to select My Computer to export the entire Registry, since, for no other reason, HKLM is enormous and you wouldn’t want to reimport it in any case.

Tip

Before making any changes ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required