This article was previously published under Q158294
This article has been archived. It is offered "as is" and will no longer be updated.
When you run Registry Editor (Regedt32.exe), and attempt to restore theregistry information of a specific key by choosing Restore from theRegistry menu, the following error message appears:
Registry Editor could not accomplish the requested operation.
This error can be caused by trying to restore a key that was saved with theSave Subtree As... option from the registry menu. This cause is describedin this article.
Additionally, attempting to use Load Hive with a key that was saved usingSave Subtree As... causes the following error:
Registry Editor could not load the key. The file is not a valid registry file.
The error message indicated in the Symptoms section can also be caused byopening the registry of a remote computer and attempting to save theregistry information of a specific key by clicking Save Key from theRegistry menu.
For additional information, please see the following article(s) in theMicrosoft Knowledge Base:
ARTICLE-ID: 139600 TITLE : Registry Editor Save Key Saves Key on Wrong Computer
WARNING: Using Registry Editor incorrectly can cause serious, system-wideproblems that may require you to reinstall Windows NT to correct them.Microsoft cannot guarantee that any problems resulting from the use ofRegistry Editor can be solved. Use this tool at your own risk.
When saving the key, instead of clicking the Save Subtree As... option,click the Save Key option from the Registry menu. When trying to restorethe key, click the Restore option from the Registry menu. The saved keywill be restored without error.
The Save Key option saves, as a file, the information contained in aregistry key and in all of its subkeys. A file created using Save Key canbe loaded into the registry (with Load Hive), or can be restored (withRestore). This format is readable by the Registry Editor and should be usedwhen trying to move or save registry keys from one registry to another.
The Save Subtree As... option saves the contents of the currently selectedkey as a text file, including all subkeys and value entries for that key.This format is used to provide a user readable text format for verifyingall of the entries in a key or subkey, and it is not meant to move or saveregistry keys.
Microsoft Windows NT Workstation 3.5, Microsoft Windows NT Workstation 3.51, Microsoft Windows NT Workstation 4.0 Developer Edition, Microsoft Windows NT Server 3.5, Microsoft Windows NT Server 3.51, Microsoft Windows NT Server 4.0 Standard Edition