Updating os but not the registry RRS feed

  • Question

  • Hi all,

    i set our boards to have an hive registry to keep the data between sessions.

    I read about it (and prove it) that the registry is reset when i update the os image but i need to save them!

    Do i need to use other way to save the data or is it possible to keep them?


    Tuesday, November 15, 2011 8:39 AM

All replies

  • Please check this :-



    Senior Design Engineer T.E.S Electronic Solutions (Bangalore-India)
    Tuesday, November 15, 2011 8:54 AM
  • Thanks Misbah,

    thanks for the link, veru useful.

    but the os upgrade process is usually done by the bootloader .. i guess i should define a procedure that:

    - starts from an application

    - saves the registry

    - resets the device

    - programs the new os image

    - restarts the device

    - and, only the first time, restores the registry and reboots the device


    Tuesday, November 15, 2011 9:35 AM
  • Hi,

    look in to this IOCTL may be useful to you..


    for controlling behavior from boot loader check the link

    by the way, why do you want to use older registry after os update, it might leave the system in inconsistent state as os image and registry may differ.


    Tuesday, November 15, 2011 10:00 AM
  • Just an example:

    i set as timezone the value +1. When i update the image i always find the timezone set as -8, i suppose the default value. I'd like to find my +1!

    If my application saves the customer data on the registry (name, address, ..), i'd like to find the data after an os upgrade, to avoid to reenter them. I cannot enter the data on production, only 'on the field'.

    Maybe I'm wrong, but how to handle this (simply) cases? Of course with a file on the SD card, but what about the timezone?

    Tuesday, November 15, 2011 10:36 AM
  • hi,

    As mentioned by Bruce in his blog


    Once the disk is mounted, it will be checked to see if hive files exist
    • If hive files exist, they will be checked to see if they are consistent with the system ROM registry
      • If they are consistent, they will be loaded
      • If they are not consistent they will be deleted and new files will be created


    one thing can be done in this case , override interested registry keys in project.reg (OEM Specific e.g timezone and set it +1 as default)

    may be the user hive can be used to write application specific data so that, i hope that at least os will found consistent as long as its not actually corrupted. as it won't be affected by OS image update. 

    last option i can see is to modify the behavior/code which checks for the consistency.



    Tuesday, November 15, 2011 11:02 AM
  • Hi Anant,

    what does exactly mean 'consistent'?

    Wednesday, December 28, 2011 3:01 PM
  • Equal.

    The Hive registry is a delta from the registry in the OS image.   So if the Registry in the OS image changes then the delta is no longer valid.   So if you are careful in developing your OS updates, and keep the registry the same, then the hive registry will not be deleted when you update.

    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG

    Eurotech Inc.
    Wednesday, December 28, 2011 3:23 PM
  • In general i cannot assume that a new OS image will have no changes.

    If I save the HKLM root on a file before update and then I reload the file on registry, I should restore the old keys, is it?

    Wednesday, December 28, 2011 6:17 PM
  • If all you are concerned about it HKLM, then yes.   But, this approach may break any fixes that you added to the registry.

    It might be better to lock down your registry settings once you do the first release, and develop a way to programmatically apply registry changes.

    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG

    Eurotech Inc.
    Wednesday, December 28, 2011 6:24 PM