Loading a registry hive from command line

Loading a registry hive can come to handy when you need to explore and export another user’s HKEY_CURRENT_USER (HKCU) registry key.

You can do this easily with the Registry Editor but I would like to script this so that I could export user’s registry for migration purpose.

To load the registry hive:

reg load HKU\hivename c:\Users\username\ntuser.dat

Now to export a registry:

reg export HKU\hivename\Software\Intel c:\temp\Intel.reg

To unload the registry hive:

reg unload HKU\hivename
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s