none
Registry and Windows CE 6 R3 RRS feed

  • Question

  • Hello,

    I have a small problem on the registry in wince 6 R3.

    Note that I 'm in a configuration " Hive - based "

    On our devices running wince 6 R3 , sometimes the user changes the keys in the registry .

    After save, and resatrting the device, the keys are always kept , and it's desired behavior ! ( stored in the file system.hv , I think )

    But If i flash a new nk.bin in which I modified the platform.reg, then all the key registry ( adding previously by users ) are missing .

    We have the initial configuration of the registry.

    So i just wanted to know , if it's a normal behavior ?

    Especially, is there a way to lose nothing after an update of  the nk.bin ?

    Thanks

    Regards,

    S.L

     

     

     

    Tuesday, February 15, 2011 3:56 PM

All replies

  • This is normal behavior.  CE stores an MD5 hash of the OS ROM image with the persisted hive, and if on a subsequent boot it detects that the ROM image has changed, the hive is wiped clean.  The hive can also be wiped clean if your OAL's implementation of the OEMIoControl function supports the IOCTL_HAL_GET_HIVE_CLEAN_FLAG  and returns TRUE.

    You cannot prevent CE from wiping the hive if the ROM changes.  This is a safety mechanism to insure compatibility between the OS image and the registry.  If you need to save some specific registry data, you could create an application that persists the information in a file on a persisted file system and restore that information at boot time as need.


    Tom Gensel PTG Systems, LLC
    http://www.ptgsystems.com
    Tuesday, February 15, 2011 4:13 PM
  • You can read this old -but valid- post about 'OS updates and the hive-based registry' http://blogs.msdn.com/b/ce_base/archive/2005/09/22/472807.aspx for further details
    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com
    Tuesday, February 15, 2011 4:30 PM
  • This is the expected behavior in Windows CE. if you want you can back up your registry and restore it later through some APIs.

    Using RegSaveKey() API you can save the registry entries to file.

    http://msdn.microsoft.com/en-us/library/aa912266.aspx

    Using RegReplaceKey() you can restore it back

    http://msdn.microsoft.com/en-us/library/aa915548.aspx


    Vinoth.R http://vinoth-vinothblog.blogspot.com http://www.e-consystems.com
    Tuesday, February 15, 2011 4:31 PM
  • Ok thanks... That's what I'll do ...

    Thanks a lot .

     

     

    Tuesday, February 15, 2011 4:34 PM