Hi,

we currently use the hive mechanism to keep registry settings on a disk
(compact flash card).
Actually only a few registry keys need to be persistent . For example the
touch calibration settings of a
touch screen driver.
It works ... but I see that the hive files are not only saving what we want
to save.

After reboot from a CF card that was in an identical hardware before,
(maybe with the exception of the network adapters MAC address)
the DHCP often doesn't work any more. I just don't get a valid address.
After deleting the hive files and restart it works fine again.

If a DHCP server gives me an IP address and other nework config data, is it
going to the registry hive ?
I think so, all delta is saved according to the documentation. Does that
cause our problems ?

Another strange effect: A USB keyboard plugged in ... works.
Then: boot without the usb keyboard.
When I then boot with the keyboard attached it doesn't work until I unplug
and replug it.
Also... removing hive files solves the problem.
The same with PC card slot. CE behaves slightly different if there was a
card in the slot last time
or not or never since the hive file was created.

Some things are just dynamic in our CE system.
I came to the conclusion that it is safer not to use hive but to save the
settings in my known reg keys
in my own binary file and to register our ocx Controls every boot time again
with a call to DllRegisterServer.
The system also boots faster without hive based registry.

Has anyone observed the same ? Maybe I can exclude registry keys from
persistence ?
Is there a better solution to the problem ?

Stephan

Re: Hive based registry - what is saved on RegFlush by Paul

Paul
Wed Jul 30 17:02:53 CDT 2003

Yes, information about what drivers are active, as well as various settings
are saved when the entire registry is saved, but I've never had a problem
where the data being saved caused the network driver not to work the next
time. More likely, your DHCP server is rejecting the second request from
the device. If you waited a few minutes and ran "ipconfig /renew", that
might be enough to get a good DHCP address.

The only registry save/restore effect that I know about causing problems is
the fact that the keys are reversed in their enumeration order each time
they go through a save/restore cycle. That is, if you enumerated some keys
and got them in the following order:

[whatever path]\drivers\serial

[whatever path]\drivers\serial2

[whatever path]\drivers\serial3

After a save and a reboot, they would be enumerated in the following order,
instead:

[whatever path]\drivers\serial3

[whatever path]\drivers\serial2

[whatever path]\drivers\serial

This caused us problems under CE 3.0 because after each reboot, the COM1
port was moving around from serial port connector to connector because of
the enumeration order.

There's no way to exclude registry keys from the hive. You could decide
that you were going to persist the registry yourself, using some other form
of storage or whatever, and then leave some keys out.

Paul T.

"Stephan" <stephanw@mail.ru> wrote in message
news:3f283d15$1@news.swissonline.ch...
> Hi,
>
> we currently use the hive mechanism to keep registry settings on a disk
> (compact flash card).
> Actually only a few registry keys need to be persistent . For example the
> touch calibration settings of a
> touch screen driver.
> It works ... but I see that the hive files are not only saving what we
want
> to save.
>
> After reboot from a CF card that was in an identical hardware before,
> (maybe with the exception of the network adapters MAC address)
> the DHCP often doesn't work any more. I just don't get a valid address.
> After deleting the hive files and restart it works fine again.
>
> If a DHCP server gives me an IP address and other nework config data, is
it
> going to the registry hive ?
> I think so, all delta is saved according to the documentation. Does that
> cause our problems ?
>
> Another strange effect: A USB keyboard plugged in ... works.
> Then: boot without the usb keyboard.
> When I then boot with the keyboard attached it doesn't work until I unplug
> and replug it.
> Also... removing hive files solves the problem.
> The same with PC card slot. CE behaves slightly different if there was a
> card in the slot last time
> or not or never since the hive file was created.
>
> Some things are just dynamic in our CE system.
> I came to the conclusion that it is safer not to use hive but to save the
> settings in my known reg keys
> in my own binary file and to register our ocx Controls every boot time
again
> with a call to DllRegisterServer.
> The system also boots faster without hive based registry.
>
> Has anyone observed the same ? Maybe I can exclude registry keys from
> persistence ?
> Is there a better solution to the problem ?
>
> Stephan
>
>
>
>
>
>



Re: Hive based registry - what is saved on RegFlush by sloh

sloh
Wed Jul 30 17:18:23 CDT 2003

The registry key reversal only happens on the RAM-based registry, not on
the hive-based registry, and it happens only when you use
WriteRegistryToOEM/ReadRegistryFromOEM, not on RegSaveFile/RegRestoreFile.

The hive-based registry persists the entire registry; there's no way to
save only a small portion or to exclude a small portion.

I don't know the answers to the DHCP / keyboard / PC card questions but I
asked a few other MS people to come comment if they have any ideas.

Sue
sloh@microsoft.com (remove "online" from reply-to address)
_____________________________________________________________
This posting is provided "AS IS" with no warranties, and confers no rights.
_____________________________________________________________
Windows Embedded FAQ
(http://www.microsoft.com/windows/embedded/faq/default.asp)


Re: Hive based registry - what is saved on RegFlush by David

David
Thu Jul 31 14:11:24 CDT 2003

For USB keyboard issue, we need more information. The device detection is
running at polling mode. So it is nothing related to device detection. One
possibility is this typical USB keyboard does not responding to the BUS
reset. If you have device attached when system boot up, the device is power
on first and port reset and enable later. If we can not get descriptor, it
is possible the Keyboard logic wrong when Reset after power on for a while.

Can you tell me it happnes only to this keyboard or other usb device as
well?
If it happens to all the device, please enable debug zone for USB host
controller at boot time by setting you desktop registry before download
image by PB.
HKEY_CURRENT_USER\Pegasus\Zones
"USB HCD"=dword:ffff

David Lia


"Stephan" <stephanw@mail.ru> wrote in message
news:3f283d15$1@news.swissonline.ch...
> Hi,
>
> we currently use the hive mechanism to keep registry settings on a disk
> (compact flash card).
> Actually only a few registry keys need to be persistent . For example the
> touch calibration settings of a
> touch screen driver.
> It works ... but I see that the hive files are not only saving what we
want
> to save.
>
> After reboot from a CF card that was in an identical hardware before,
> (maybe with the exception of the network adapters MAC address)
> the DHCP often doesn't work any more. I just don't get a valid address.
> After deleting the hive files and restart it works fine again.
>
> If a DHCP server gives me an IP address and other nework config data, is
it
> going to the registry hive ?
> I think so, all delta is saved according to the documentation. Does that
> cause our problems ?
>
> Another strange effect: A USB keyboard plugged in ... works.
> Then: boot without the usb keyboard.
> When I then boot with the keyboard attached it doesn't work until I unplug
> and replug it.
> Also... removing hive files solves the problem.
> The same with PC card slot. CE behaves slightly different if there was a
> card in the slot last time
> or not or never since the hive file was created.
>
> Some things are just dynamic in our CE system.
> I came to the conclusion that it is safer not to use hive but to save the
> settings in my known reg keys
> in my own binary file and to register our ocx Controls every boot time
again
> with a call to DllRegisterServer.
> The system also boots faster without hive based registry.
>
> Has anyone observed the same ? Maybe I can exclude registry keys from
> persistence ?
> Is there a better solution to the problem ?
>
> Stephan
>
>
>
>
>
>



Re: Hive based registry - what is saved on RegFlush by stephanw

stephanw
Thu Aug 07 08:43:54 CDT 2003

I did try the renew workaround. But I get a 0.0.0.0 address

"bill" <poddw@yahoo.com> wrote in message news:<OgaEUWvVDHA.1052@TK2MSFTNGP09.phx.gbl>...
> I've seen the DHCP issue before, but I got to it a different way. I then
> couldn't reproduce it when I went to write up the steps to file a case with
> Microsoft.
>
> What I saw was that if had a registry setting associating an IP with a MAC
> and I changed the MAC in my hardware (which you are doing by moving the
> registry on the CF card to a different unit), DHCP didn't handle the
> rejection from the DCHP server correctly.
>
> I suggest your DHCP issue isn't hive related as much as DCHP related. If you
> can sniff the DHCP packets you might have a good trace to make open a case.
> Also, Mr. Tobey's suggestion about renewing should work as a valid one time
> work around in this case.
>