Link to home
Start Free TrialLog in
Avatar of mjgardne
mjgardne

asked on

Load Win98 Registry File: User.dat or System.dat

Hello,

I have some ancient Win98, WinMe, and WinNT registry hive files that I want to examine.  When I tried to load them in regedit on a Vista computer, it failed saying "Cannot load c:\temp\win98\system.dat: Error while loading hive".  System.dat should be okay since I've just built the Win98 system, exported its registry tree, and copied these files to a USB drive using alternative boot disk (WinPE).  Magic Jelly Bean could not load this hive file...  So...  A really basic question...  I assume that I can load an old registry format file in regedit on a Vista or WinXP computer.  Is that right?  I tried to get more information, so I wrote a quick C++ CLI program.  When I used RegLoadFile on this registry file, it reported "Failed with error 1017.  The system has attempted to load or restore a flie into the registry, but the specified file is not in a registry file format."  Assuming that the files are not corrupted, I am at a loss as to what is going on...  Help, Please! :)  Ultimately, I need to write a program that will open any offline version of registry files on Vista or WinXp computers and need to figure out if there are any special procedures when working with older registry files on newer versions of Windows...

Thanks for your help,

Mike
Avatar of mjgardne
mjgardne

ASKER

An error message generated by Registry Tool.
RegistryToolErrorMessage.jpg
Avatar of AndyAinscow
Win98/Me is ASCII based, VIsta is UNICODE based.
That might be part of your problem.

I guess Microsoft has also changed the format of the registry files - so basically you would need to convert the old registry hive into the new format.
Hi Andy,

Hmmmmm...  I did some more research and I found something that mentioned that the system.dat file is a pure branch from the registry and as such it cannot be mounted in the normal way under a key that I create...  Have you heard anything about this?  At MSDN, they say that there are two registry formats, but they said/implied (been a few days) that things were backwardly compatible.  This is why I expected RegLoadFile to work.  I know that W9x is no longer supported, but I would expect that whatever functionality existed in the past would have been kept in place...  I would love to learn how people accessed SYSTEM.DAT in the past before WinNT.  I wonder if I call RegLoadFile without a mount point, what would happen....
Sorry, I don't know the registry in such detail.

I think for loading into another op system one should use the functionality to export a branch to a .reg file and then import that (textual) file.
...  Yeah, I thought about that but it does not meet our requirements.  We repair and upgrade computers and often receive old, dead machines... So, it is not possible to use import and export on them.  I've tried to remove the old hard drive and place it into our WinXP shop computer, but it will not permit us to load the old Win9X/Me system.dat files via regedit.  Argggg... There must be some way to accomplish this feat!  :)   I suspect  that RegLoadFile() could be used, but with a special mounting point or something.
ASKER CERTIFIED SOLUTION
Avatar of Gideon7
Gideon7
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I am dumbfounded that there are no Microsoft system calls to load old registry hives, but what it, is...  I did find technical details on the internal structure of the old .DAT files, so it is feasible to write code to process them, but the cost of implementation just isn't justified.  The answer that both contributors gave about not being able to access .DAT files from new versions of the OS is correct and accepted.  Andy's work-around is also what we have done...  We've built a WinMe machine and made an image of it.  If we desperately need to access or export an old .DAT file, it will be possible through the image file.  It still is amazing that there are not any system libraries that could be used...  Oh, well... Live and learn! :)

Thanks for the help, gang!  :)

MIke