Re: How Do I to update kernel keeping registry settings?



Keep in mind that if you do not change the registry between to OS releases,
the hive will stay persistent. Of course QFEs may cause problems for you.
I agree with Paul, since by replacing the "new" registry with your "old"
registry you are deleting any positive changes. You can resolve this
problem by doing as you plan, but also releasing a registry delta and
applying that after you restore the registry. Messy, but may practical.

--
Bruce Eitman (eMVP)
Senior Engineer
beitman AT applieddata DOT net

Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member

"Miguel Pérez" <MiguelPrez@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:7D7CD71A-691C-4EC5-A09F-794E971AA93C@xxxxxxxxxxxxxxxx
Hi Paul,

First of all, thank you very much for your quick answer. I apologize for
my
English. I am going to try to explain better my problem.

At the moment, I am working on how to manage upgrades that require
registry
modifications. As I understand it, registry hives are stamped with a
signature indicating the registry from which they are based and that
signature RegSaveKey operates on one hive at a time; calling this API on
HKEY_LOCAL_MACHINE will save the system hive to a file, and calling it on
HKEY_CURRENT_USER will save the current user's hive. Conversely,
RegReplaceKey can only be used with HKEY_LOCAL_MACHINE. It replaces the
system hive only. To replace a user hive, the OEM may call SetCurrentUser
with a NULL user name to log off the current user, and then call CopyFile
to
replace the user's invalid hive with a saved known viable hive must match
that of nk.bin's default registry or it will replace the existing registry
with the default. You can imagine the problems I might run into when I do
upgrades. Customers won't be happy if a firmware upgrade destroys their
registry settings. Do you have any experience with this problem?

The main aim is to restore registry settings after I do an upgrade. The
backup and recover of the hive registry is possible with two APIs
(RegSaveKey, RegReplaceKey) but they work only for HKLM entries. I would
like
to backup HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER, too.

In addition to the previous statement, I was trying a Microsoft's
recommendation. To replace a user hive (HKCU), the OEM may call
SetCurrentUser with a NULL user name to log off the current user, and then
call CopyFile to replace the user's invalid hive with a saved known viable
hive. However, it does not work. :-(

Any idea? Thanks a lot.


Have a nice day!

--
Miguel Ángel Pérez Ruiz


"Paul G. Tobey [eMVP]" wrote:

What's the problem/question? The only question I see there is, "And
HKEY_CURRENT_USER?" That's not a usable question.

Tell us more about what you *actually* need to do. You have to reset the
registry, after you OS update which changes the registry, to be *exactly*
what it was before? I doubt that *very* seriously. Wouldn't that cause
you
to lost the value for your OS update? No load new drivers that you
added,
cause device.exe to try to load drivers that you removed? Concentrate on
what you actually *need* to do and make your registry save program do
*that*, not try to completely save the registry...

Paul T.


.



Relevant Pages

  • RE: for..in..do
    ... ' Configures the registry settings. ... ' Loads the individual user profile hives and configures needed USER ... Dim strUserSID, Subfolder, UserPaths, strRegPath, strRegistryHive, ... registry, import the reg file, then unload the reg hive. ...
    (microsoft.public.scripting.vbscript)
  • Re: How Do I to update kernel keeping registry settings?
    ... I am working on how to manage upgrades that require registry ... registry hives are stamped with a ... The main aim is to restore registry settings after I do an upgrade. ...
    (microsoft.public.windowsce.embedded)
  • Re: Storing persistent configuration on separate partition using RegLoadKey
    ... it would be beneficial to move to use an application profile that can be moved around much easier that registry ... is the only EWF protected partition and is about ... >> store persistent configuration information in a file on the D: ... >> the registry since one can only load hives directly under HKLM or HKU ...
    (microsoft.public.windowsxp.embedded)
  • Re: ROM-only FS and persisting registry on USB HD
    ... ; END HIVE BOOT SECTION ... comments in your registry. ... Therefore, you have to have your USB host controller's driver settings, ... been generated, registry hives are there, but the windows folder is not ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Storing persistent configuration on separate partition using RegLoadKey
    ... I can solve this trough driver, basically it is should be simple. ... >> from certain registry branches that you use to some virtual paths for ... We are planning to use RAM EWF ... >>> the registry since one can only load hives directly under HKLM or ...
    (microsoft.public.windowsxp.embedded)