Re: How Do I to update kernel keeping registry settings?
- From: Miguel Pérez <MiguelPrez@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 3 Apr 2008 00:50:01 -0700
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.
- Follow-Ups:
- Re: How Do I to update kernel keeping registry settings?
- From: Bruce Eitman [eMVP]
- Re: How Do I to update kernel keeping registry settings?
- From: Paul G. Tobey [eMVP]
- Re: How Do I to update kernel keeping registry settings?
- References:
- How Do I to update kernel keeping registry settings?
- From: Miguel
- Re: How Do I to update kernel keeping registry settings?
- From: Paul G. Tobey [eMVP]
- How Do I to update kernel keeping registry settings?
- Prev by Date: Re: Run a custom app on startup
- Next by Date: How to get SD card/IPSM name ??
- Previous by thread: Re: How Do I to update kernel keeping registry settings?
- Next by thread: Re: How Do I to update kernel keeping registry settings?
- Index(es):
Relevant Pages
|
|