Re: How Do I to update kernel keeping registry settings?
- From: "Bruce Eitman [eMVP]" <beitman.nospam@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 3 Apr 2008 12:16:52 -0400
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.
.
- 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]
- Re: How Do I to update kernel keeping registry settings?
- From: Miguel Pérez
- How Do I to update kernel keeping registry settings?
- Prev by Date: Re: WideCharToMultiByte issue in CE 5.0
- Next by Date: Re: Timezones
- Previous by thread: Re: How Do I to update kernel keeping registry settings?
- Next by thread: Example PCI driver?
- Index(es):
Relevant Pages
|
|