Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restoring The Registry Settings windows 2003

Status
Not open for further replies.

bindu143

Technical User
Sep 8, 2009
40
GB
Hi
Basically i want to do a testing on registry before i could make any changes on registry for RPC port on my servers .Using a test PC I had taken a export by right clicking the RPC in the hive HKEY_LOCAL_MACHINE\Software\Microsoft\Rpc\ . After exporting the keys for this particular i created a key as Internet under HKEY_LOCAL_MACHINE\Software\Microsoft\Rpc\Internet.Again i creted some string values under Internet.

Now i wanted to restore the registry settings back to my earlier settings before i created internet value . i double clicked the exported registry backup it asked me are are sure want to add the information to the registry and said yes.Now when i opened the regedit and explored to HKEY_LOCAL_MACHINE\Software\Microsoft\Rpc\.I can still see the Internet Key. But iam confused now, i thought when iam restoring exported key it shoud not show the internet key again .Is that actual settings should be HKEY_LOCAL_MACHINE\Software\Microsoft\Rpc

Is that trure or false if what happenning when restoring back
Thanks
 
It depends on what edits were made (the quote posted below will explain this). Have a look at the linked article as it thoroughly explains various methods to backup and restore the registry. In your case the values you created would indeed stick around even when you merged the .reg file you exported prior to making changes in the registry. What would have worked in this situation is if you exported the key and saved it as a Registry Hive File. When you would have imported the file using this method it would have restored the key to the same state as it was before you made any edits. You have to be cautious to import the hive file in the proper location or you may end up restoring it over the wrong key.

- Backing Up and Restoring the Windows XP Registry


I touched briefly on this information in the Types of Registry Backups section at the beginning of this tutorial but it bears a repeat visit. The basic weakness in a .reg file backup boils down to a two word war; Merge versus Replace. Assume for a moment you've made a .reg backup and safely tucked it away. You go ahead and edit the registry using Registry Editor, but unfortunately your changes don't work as planned. You turn to the .reg backup file and expect that running it will restore the registry to the way it was prior to your edits. Will it really do so or are your expectations about to be dashed?

The answer is; Maybe, depending on what edits you made. This is where Merge versus Replace comes into play. let's look at some If/Then statements.

[If] a value exists in the .reg file and also exists in the modified registry [Then] the value will be changed in the registry.
[If] a value exists in the .reg file but not in the modified registry [Then] the value will be added to the registry.
[If] a value does not exist in the .reg file but does exist in the modified registry [Then] the value will not be removed or changed in the registry.
[If] a value does not exist in the .reg file and does not exist in the modified registry [Then] there is no action to be taken in the registry.

Joey
CCNA, MCSA 2003, MCP, A+, Network+, Wireless#
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top