Jump to content

regedit 5 files in regedit 4


kdsg

Recommended Posts

somebody knows like import archives of regedit 5 in regedit 4?

I do not look for file conversion regedit 4

of the same form that regedit 5 can concern archives of regedit 4

somebody can create this project?

Link to comment
Share on other sites


I don't know of any such way to import registry 'archives' from regedit5 into regedit 4.

Only way I know of such is merging regedit5 registry files into regedit 4 by changing the first line 'registry editor 5' to 'REGEDIT4' to be able to merge it.

Link to comment
Share on other sites

If I'm not mistaken, the Regedit5 files are also in Unicode format, so they would not be recognized as valid unless first converted to ANSI format (Metapad can do that in a blink of an eye).

I suppose someone could create an interface that'd first check the version, do the conversion internally when needed and then call regedit to merge the information into registry. The only issue would be to associate .reg files with that application, in case it was created as a standalone and not as an API hook.

Link to comment
Share on other sites

somebody knows like import archives of regedit 5 in regedit 4?

I do not look for file conversion regedit 4

of the same form that regedit 5 can concern archives of regedit 4

somebody can create this project?

Not really understanding you, so a reasonable assumption: you are planning to import a REG file into Win9x that was exported from 2K/XP. Well, beware. First, the differences:

(1) The 1st line is different (and for good reason). In WinXP, using the default native export selection flags its exports with Windows Registry Editor Version 5.00 and Win9x uses REGEDIT4. Thankfully, Win9x will refuse a WinXP REG file however, the reverse is *not* true. One must wonder what the idiots at Microsoft were thinking allowing the REGEDIT4 files to happily import into their secure XP environment. :thumbdown

(2) As Drugwash mentioned, the default native XP exports are in Unicode, which really just means they take up twice as much space in ASCII text format on disk. Any good editor can rip out the extra bytes. Interestingly, on WinXP, the REGEDIT there does not care if it imports unicode or ASCII (regardless of the header). And, as just mentioned it also doesn't care if the first line says REGEDIT4. (In this sense Win9x REGEDIT.EXE is more secure).

(3) Now it gets dangerous. Win9x exports are full of .default keys plus the rare additional user accounts. WinXP exports enumerate all the users specifically and also exports the machines' .default user (which should not be tampered with). In short, the .default user in Win9x is 99% of the time the main/only user and gets tons of customization, while on XP it is almost a constant. They are practically opposite in concept. The Lesson: the SYSTEM hives are somewhat comparable, the USERs are not. Only deal with the HKEY_CURRENT_USER alias and avoid HKEY_USERS\xxx for safety.

(4) But, there are technical differences many have noticed (as the Registry is still undocumented). There are new value types in 'REGEDIT5' that do not exist in REGEDIT4 and cannot be created (REGEDIT4 appears to strip them off during import). So this fact will affect what you are trying to do: data will most likely be lost during WinXP_to_Win9x. Secondly, if you Windiff exports of both types REGEDIT4 and REGEDIT5 from XP (remove Unicode first) you will see actual data differences as well. This means that the method that was selected to make the 'REGEDIT5' script may not have given you what you wanted to bring to Win9x in the first place.

(5) Writing data values to the 'root' of the keys: HKEY_LOCAL_MACHINE or HKEY_USERS while quite common in Win9x is not possible in WinXP from a REG script although it can be done directly. WinXP REGEDIT imports will abort immediately when it encounters one, and consequently any valid stuff beyond that does not get imported.

(6) This is the dealbreaker: there appears to be no limit to the size of data values in WinXP. I think Win95 used 64kb or something. Win98 must also have some limit. But some of the values in WinXP are in MEGABYTES (ActiveX cache?). This is a poison pill for Win9x.

There's many more, (cosmetic line breaks, very long line lengths, etc) but to keep this short, onto the warnings:

* The smallest WinXP export I have seen (REGEDIT select Win9x/NT ASCII) is over 14 MB. That is after a fresh install, single user. That size alone is enough to crash most Win9x systems on the next bootup if it were merged. Don't do that.

* Even if you had two identical motherboards/drives/everything running identical Win98se, the REG exports would not be 100% compatible for a complete merge as PnP settings will differ (but yeah, it can be made to work). Win95/98/ME differences further enlarge the error scope. The consequences of taking from WinXP into Win9x via registry scripts can be severe. It's a risky business, however, I do it often :whistle: . Advice: you must eyeball the entire REG script looking out for all of these problems.

Of course the real beauty of Win9x is that you just need to copy SYSTEM.DAT and USER.DAT (add CLASSES.DAT for WinME) for emergencies (and know how to replace them from DOS), then you can try many dangerous experiments. We cannot say the same for WinXP and its direct relatives. Microsoft has bolted the back door shut (e.g., copying the actual 'DAT' hives) but left the front door wide open (WinXP REGEDIT.EXE says: "Dude, you want to import this old non-unicode REGEDIT4 script right over top of me? Sure no problem!").

Your friendly neighborhood RegSlinger.

Edited by CharlotteTheHarlot
Link to comment
Share on other sites

I only want to import this:

HKEY_CURRENT_USER\SOFTWARE\

HKEY_LOCAL_MACHINE\SOFTWARE\

It certainly can be imported. No doubt about that. But do you really want to? Anyway, a little more explanation would help. My guess is you want to port some software back to Win9x? Porting apps from WinXp to Win9x is do-able, but time consuming. Porting entire Users or HKLM\Software will fail without serious auditing. Make sure you have the skill to restore your saved DAT files from within DOS.. If you don't just ask.

In my previous post see item #6 concerning data size. That fact has led to some extremely poor programming practices by big-name companies. Since there appears to be no limit to the size of data stuffed into any given value, programmers are busy exploring this fully by inserting meaningless reams of data into the SYSTEM REGISTRY, data that would be better off in an external private file. Sound companies keep audio presets in there, Microsoft kick-started it with MSI installations (never 'install' a pSdk on Win9x). Nowadays, there is no restraint. To be clear, if an app requires megabytes of data within a single value, that app cannot be used in Win9x period. Why, because when you import the REG it will look ok, but Win9x will most likely not survive a reboot. Cause of death: OUT OF MEMORY.

Without knowing what is installed in that machine there is no way to tell the size of those branches. Export them separately and tell us the size at least (in ASCII). Know this, those branches are each the largest within those respective hives. There would be some overlap with identical keys in Win9x but probably not much. So for example you might have HKLM\Software as 13 MB ASCII of which only 2 MB overlaps with a net gain of 11 MB to Win9x. Not good. Remember this, Win9x Achille's heel is the registry. Many other problems have been overcome by the wizards in this very forum. The registry cannot as the RAM limit appears to be hard. In my experience when the Win9x DATs hit 15-16 MB combined (or 20+ MB exports) you are living on a razor's edge.

Let me add to my previous post regarding registry differences (as they pertain directly to you).

7) WinXP uses System32 instead of System as the core Windows System directory. So editing is necessary to swap the System32 references to System. But that is not enough, the files would need to be made to exist in Win9x's System directory. Alternatively, you might just copy the System32 directory (tricky) to Win9x and then iron out the creases with a Registry Mechanic type of auditor. This opens another can of worms because more modern WinXp apps coded to operate under SideBySide often self-register nearby files (e.g., MFC42.DLL or MSVCRT.DLL will often be re-registered in a ported apps own directory which is ok on WinXP since the OS corrects these but it leaves Win9x with broken programs).

8) Most %SomethingDir% style aliases which are everywhere in a WinXP registry never seem to work in Win9x regardless of how I insert them into the environment. On WinXP they are not typical environment variables defined in plain sight. They appear to be built-in to some core file. Converting them to hard strings is also problematic because they are often buried in REG_EXPAND_SZ types. 3rd party tools like RegWorks and RegistryWorkshop can sometimes help, but it is tedious work.

One other thing to remember: before embarking on a registry porting project you should make sure that the app can even operate within Win9x by probing its dependencies. See what the folks in the KernelEx forum are using. (I use MS Depends and Karri LinkCheck/Function Check).

Note to lazy programmers: just because WinXP apparently can use any size registry (it boots up ok and does not crash), there is still a price to be paid. Often used GUI functions which all rely heavily on settings in the registry slow down as ithey recurse over and around all the seldom used crap that is also stored in there. The StartMenu and submenu flyouts are the first to feel the pain, also right-click Context menus get long delays. What a mess! Even at DDRx speed, a 50-100MB registry held entirely in RAM still is saved to disk, often. It has to be. If you had a clue you would place seldom needed data in private files. As an added benefit, your app would have a much better chance of survivng a rollback.

Link to comment
Share on other sites

I only want to import this:

HKEY_CURRENT_USER\SOFTWARE\

HKEY_LOCAL_MACHINE\SOFTWARE\

To reinforce what Charlotte has quite rightly said, don't even think about doing this!

If you want to copy settings for a particular piece of software from one OS to the other just export and import the section for that application.

Copying the whole lot across will be a recipe for disaster as there will surely be a huge number of incompatible paths at very least. Remember that this will include all your Windows OS settings!

:o

While we're on this subject, I have a dual boot Windows 98SE and Windows 2000 system, and I have often copied registry settings from one to the other by exporting and importing keys. I have never run across any compatibility problems with the regisrty files. Are the files in the same format on W98SE and W2K and different on XP?

I usually use the Norton registry editor to do this rather than the MS regedit.

:)

Edited by Dave-H
Link to comment
Share on other sites

I only want to import this:

HKEY_CURRENT_USER\SOFTWARE\

HKEY_LOCAL_MACHINE\SOFTWARE\

To reinforce what Charlotte has quite rightly said, don't even think about doing this!

If you want to copy settings for a particular piece of software from one OS to the other just export and import the section for that application.

Copying the whole lot across will be a recipe for disaster as there will surely be a huge number of incompatible paths at very least. Remember that this will include all your Windows OS settings!

:o

Running an auditor would be good for a laugh! Or a cry.

While we're on this subject, I have a dual boot Windows 98SE and Windows 2000 system, and I have often copied registry settings from one to the other by exporting and importing keys. I have never run across any compatibility problems with the regisrty files. Are the files in the same format on W98SE and W2K and different on XP?

I usually use the Norton registry editor to do this rather than the MS regedit.

:)

Win2k==WinXP but not Win9x. The 2k/XP files are exactly the same format, Unicode by default with regard to REGEDIT. Most likely Norton NREGEDIT has defaulted to ANSI on its exports. It is likely duplicating the 2k/XP REGEDIT.EXE drop-down selection of NT4/Win9x (with its quirks). Data can be lost enroute to Win9x. For something mission critical you just snapshot Win9x before/after the Win2k export data is added. Then Windiff the snapshots and isolate what came in. Take that and Windiff it back to the Win2k export. If the exported data included expanded strings you can manually harcode them with fixed paths in normal strings.

A little off-topic but this gets me wondering (uh oh!): just how comparable are the REGEDIT.EXE in 2k and XP with respect to exporting the live registry hives to ASCII? Porting apps between 2k/XP is where this might matter.

Problem is, I cannot think of a good way to compare their outputs. How would each export the *same* Registry, would they be identical? I would want exports from 2k's and XP's REGEDIT.EXE of the exact same source data: an identical registry existing on both platforms, which is impossible. A brave person might patch the version strings in REGEDIT.EXE from 2k or XP and run it on the opposing system just long enough to get an export. Risky, a mistake means somehow restoring 2k/XP to a fallback registry. I think Microsoft suggests System Restore ... NOT!

It used to be real simple. We used to do something similar on Win95, using patched REGEDIT from OSR and later 98 to allow some systems to continue working as the registries got bigger and more complex (if re-installing well-working software on an updated OS was out of the question). Even using one system for generating DATs from REGs for other systems that could no longer complete REGEDIT /C from complex BLOATED .reg files. With an appropriate boot disk anything was do-able.

Now here is some real useful info which I never saw before: an awesome roundup of the available Registry information is sitting right on the website of this board's own MDGx on this page: COMPREHENSIVE WINDOWS REGISTRY GUIDE. All I can say is holy crap, nice job!

Link to comment
Share on other sites

Win2k==WinXP but not Win9x. The 2k/XP files are exactly the same format, Unicode by default with regard to REGEDIT. Most likely Norton NREGEDIT has defaulted to ANSI on its exports. It is likely duplicating the 2k/XP REGEDIT.EXE drop-down selection of NT4/Win9x (with its quirks). Data can be lost enroute to Win9x. For something mission critical you just snapshot Win9x before/after the Win2k export data is added. Then Windiff the snapshots and isolate what came in. Take that and Windiff it back to the Win2k export. If the exported data included expanded strings you can manually harcode them with fixed paths in normal strings.

I've only ever exported and imported single keys, or occasionally blocks of keys relating to a single application.

One of the things with a dual boot system is that applications which are installed on both systems don't have their setting changes mirrored on the other OS if they store them in the registry, and this procedure overcomes that.

In that respect, INI files stored in the application's own folder do have their advantages!

I always look at the keys' contents in Notepad and amend any incompatible paths etc. before I import them into the other OS!

I've never had a problem yet (touch wood!)

The only problem I've noticed with NREGEDIT is that it often does not write valid numerical DWORD values in Win2K.

They look OK in NREGEDIT but don't work, and when viewed in REGEDIT it says "invalid DWORD value" and you have to re-enter it using that.

Always works fine in Win98.

:)

Now here is some real useful info which I never saw before: an awesome roundup of the available Registry information is sitting right on the website of this board's own MDGx on this page: COMPREHENSIVE WINDOWS REGISTRY GUIDE. All I can say is holy crap, nice job!

Yes, that is a great resource!

:thumbup

Edited by Dave-H
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...