View Full Version : Export Registry Key
FrankSG
01-04-2003, 02:25 PM
My OS is WinXP Home Edition. I get an error message when I export one of the Registry keys. The only one I get the error message with is when I export the HKEY_LOCAL_MACHINE key--with the other keys there is no problem. Here's what happens: I get into the Registry Editor, select the key that I want to export and click on File/Export. When the box pops up, I save it as a reg. file named HKLM. I save in C:\Registry Backups. For a few seconds, I see the hour glass and then I get a message that says, "Cannot export C:\Registry Backups\HKLM.reg: Error writing the file. There may be a disk or file system error." As I mentioned, the HKEY_LOCAL_MACHINE is the only one that gives me that error message. There is no problem with the other keys. If I attempt to export on of the sub-keys in that particular key, I sometimes get an error message and some times not. One time when I tried to export a sub-key, I got a message that said, "The selected branch does not exist." Even if I save the keys as a Hive file, it makes no difference--I get the same error messages. Now, here's what's strange--even those I get those messages, the keys are actually exported. I can go into that folder where they're saved and edit the files and every thing appears to be there. At least I hope that everything is there. It's actually the largest of all the keys--14.9 MB. Does anyone have any thoughts as to what's going on?
Thanks. ~Frank~
YODA74
01-05-2003, 07:05 AM
not sure but "FileName" must be the name of a new file that does not already exist.and it might have somthing to do with the extension?
you might want to breeze thru some of these might find something?
http://groups.google.com/groups?q=How+to+export+the+HKEY_LOCAL_MACHINE+key&hl=en&lr=&ie=UTF-8&oe=UTF-8&start=10&sa=N
Vic 970
01-05-2003, 07:47 AM
have you done a reg-clean to sort out any invalid entries?
FrankSG
01-05-2003, 08:27 PM
Yes, I did run RegCleaner and removed some invalid entries. But, I get the same error message when I export HKEY_USER_MACHINE. This isn't a big problem since there are other ways that I can backup the registry. But,it just bugs me when I run into something like this.
Vic 970
01-06-2003, 02:10 PM
try easycleaner see what it finds.
http://www.toniarts.com/ecleane.htm
FrankSG
01-06-2003, 04:00 PM
Wow! EasyCleaner found a bunch more--even after I ran RegCleaner. It didn't solve my problem though. But I was surprised at how many it found. Before I ran it, I made a restore point just in case I removed some entries that were needed. So far everything runs O.K. I always knew that most registries contained a lot of unnecessary entries, but I didn't realize that there were so many.
I have always ran RegCleaner and EasyCleaner on after the other, because they each look for different things. There is some overlap but each one includes different items to search for. As far as I can tell there isn't one registry cleaner that actually searches for everything.
Sylvander
01-08-2003, 06:08 AM
1. Is there enough space [on the drive] for the file to be made?
[I presume there is. Just checking.]
2. I'm wondering if the swap file is used as temporary storage during the production of the file and is their anything limiting it's size. [Do you have a fixed size swap file?]
3. Be wary of deleting registry settings that point to non-existent files. Perhaps some of these are the addresses of files to be created under certain circumstances.
Satisfy yourself that these truly are orphaned settings.
4. Can you use the Windows XP version of “scanreg /fix” [done at a DOS prompt] to at least make certain there is nothing in the registry that “scanreg” [or Win XP] would consider needed fixed. Perhaps it refuses to export a registry key that includes something it identifies as a problem.
FrankSG
01-08-2003, 09:26 AM
Yes, I do have enough space on my drive--about 40MG of free space. After reading what you said about the swap file, I thought that maybe that might be the problem since I did have it set at a fixed size. I had it set for a pretty big size, but never-the-less, fixed. So, I went back and set it so that Windows would manage it without a fixed size. But, that didn't solve it. I tried running scanreg /fix from a DOS prompt, but got a message that said "Scanreg is not recognized as a command--." So, maybe that command is one that the Home edition of XP doesn't have. But, you did say something that got me to thinking when you mentioned the fact that a person should be wary of deleting registry entries since some of the entries may be addresses of files to be created under certain circumstances. Well--over the last couple of months I have used RegCleaner several times to delete "unneeded" entries. So, who knows, one of those entries could have been one that is giving me the error message. I'm not going to be too concerned about it because it's not a big problem. But, from now on, I think I'm going to very selective when it comes to deleting anymore entries in my registry since deleting the wrong one could cause a *big* problem. Thanks to everyone for responding.
Sylvander
01-08-2003, 10:10 AM
How about doing a repair of your Windows installation [re-run "setup.exe"] just in case something vital has been deleted from the registry?
What does Windows XP use to "repair" the registry?
In Windows 98 "C:\Windows\Command\Scanreg.exe" does the job.
Under certain circumstances [e.g.if you don't "re-start in MS-DOS mode"] it is necessary to navigate to the "C:\Windows\Command" folder to activate "Scanreg.exe".
Sylvander
01-08-2003, 11:37 AM
I used
Filemon.exe = http://www.sysinternals.com/ntw2k/source/filemon.shtml
and then
Regmon.exe = http://www.sysinternals.com/ntw2k/source/regmon.shtml
To study file and registry accesses whilst [successfully] exporting the HKLM key to a “HKLM.reg” file on the desktop.
It was interesting to see the results of the 14,000 file accesses.
I didn’t see the 50,000 registry accesses because my PC froze near the end.
I closed everything [one prog = tclock.exe] which caused accesses then tiled regedit and filemon horizontally;
Switched off recording of events; cleared the screen; switched recording back on; noted each action and wrote down the last access number which resulted.
You might see a “FAIL” at some point that gives a clue to the cause.
Even if you don’t it will give some idea of what goes on unseen.
FrankSG
01-08-2003, 12:13 PM
That sounds interesting. I'm going to give it a try later on today--probably this evening. After reading your previous message, it dawned on me how to a check on my system. I don't know if it checks the registry or not, but on XP if you right click on the icon for drive C:, then click on Properties/Tools, it will bring up a box that asks if you want to check you volume for errors. I did that. I'm not sure that I want to do a repair running setup.exe--I'm a little nervous about that. But later on I will check into the other things and see what I come up with. Right now I'm going to take a nap. Then I'm going to rent a couple of movie videos and watch a movie with my wife. That way she won't have to ask me, "How long are you going to be on that darn computer?" :-) Of course she is just joking about it------I think. :-)
FrankSG
01-08-2003, 07:26 PM
I downloaded and used Regmon. I used it and everything was either "SUCCESS" or "NOT FOUND". There was not a single line that read, "FAIL". What I'm going to do now is to print the Help pages and study it.
Sylvander
01-09-2003, 05:01 AM
That's only one part of the whole.
One other part is the file accesses.
There could be a failure there.
There must be a failure somewhere.
The activity doesn't complete.
Surely the accesses stop at the point of failure, when that failure is then reported.
Not finding a registry setting which is necessary could cause a failure.
Alternatively, the fact that a setting does not exist could be the trigger for another course of action.
The problem with interpreting registry accesses is that they are complex [to simple folk like me].
You make a giant leap forward in understanding when you begin to make sense of them.
One action can involve hundreds or thousands of accesses.
Imagine a workman doing some task inside a large box.
You are outside watching him reach out to a table where various objects are placed and you try to guess what he is doing from the objects retrieved and their sequence.
It gets even worse when there are numerous workmen [programmes] and thousands of retrievals.
It's rather like code breaking.
After re-reading the original post again, I am not sure I would trust the exports you made as being accurate backups.
Are you trying this logged in your main account or as a different user?
There is also the possibility that something you are running in the background is changing an entry while you are trying to write, or doesn't like large file transfers.
Try shutting down your AV while attempting the export.
FrankSG
01-09-2003, 07:52 PM
I'm always logged in as sole owner since I'm the only one who runs this computer--it's my home computer. I tend to agree with you about not trusting the exports since I get that error message. I'm not backing up my registry that way any longer. I either use the Windows backup program, or I create a restore point. I tried exporting again with Norton AV and ZoneAlarm shutdown, but I still get the same result. I'm just wondering if there is anyone else who has Windows XP Home version and if they have tried exporting the HKLM key. If so, are they getting the same error message as I have been getting.
Vic 970
01-10-2003, 05:24 PM
don't know if you're aware (as I haven't seen it mentioned) that RegClean creates an 'undo' file for every 'fix' so if you haven't deleted them you can undo them.
they are stored in the same directory as 'Regclean'
dollphinpod
02-20-2008, 05:05 PM
I too faced the same error when attempting to export hkey local machine to a hive file. I was able to export each branch of hklm separately except security. When attempting to export the security branch of hklm it gave me the branch does not exist error. I know this is an old thread but felt others looking for a more info like me would benefit. You can backup all except the affected branches. I just makes import more complicated (import multiple files)
vBulletin v3.6.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.