Thursday, June 11, 2009

Backup and restore registry key


For example, let’s assume that we are working with the programs that start automatically when we start the computer. We want to be sure that we don’t mess up these registry entries so we want to back up the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

registry key. To do this, we would perform the following steps.

  1. Start the Registry Editor by going to Start→Run…, typing in regedit and then clicking the OK button.

  2. Browse to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run registry key and click on it.

  3. Under the File menu, click on Export…

  4. Save the file as Startup.reg on the desktop.

You have successfully saved the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run registry key as Startup.reg.

The Startup.reg file is actually just a text file and you can open it up in notepad to see what is in it. If you want to add these registry settings back into your registry, simply right-click on the Startup.reg file and select Merge.

Note: When you merge a registry file back into the registry, it will overwrite any settings that are in that registry key. Use with caution!


No comments:

Post a Comment