How to restore the persistent registry setting back with New NK.bin OS Image RRS feed

  • Question

  • Hi

    We have created the Hive base persistent registry setting in SD card. We have created application which creates and stores the persistent registry parameter. When we reboot the device we are getting back the parameter values what it has been saved the registry values .

    But when we change/ upgrade the device with new OS (NK.bin), we are not getting back the registry parameters which the old OS has created the parameters. 

    Please let me know how to intact the registry parameters which has been created by previous NK.bin.


    Thursday, November 10, 2011 5:15 AM

All replies

  • See the following link specifically step 15) for the reason for registry clean up when downloading the new OS.

    15) If a clean registry is not required, the system registry hive file (System.hv) is loaded from the file system that contains it. A signature in the system hive file is checked against a signature in the ROM portion of the system registry. If the signatures do not match, a clean registry is required, even if this is not indicated by IOCTL_HAL_GET_HIVE_CLEAN_FLAG.


    See the link for different ways of registry persistency.

    Thursday, November 10, 2011 8:56 AM
  • Hi Vinoth,

    Thanks for your response.

    Already we have tried with RegCopyFile and RegRestoreFile  with RegFlushKey,but it did'd help us. Now we are checking

     first option which you have mentioned above


    Thursday, November 10, 2011 1:18 PM
  • The problem is that any persistent registry will overwrite changes made to the new OS registry.   That can eliminate bug fixes and new features.

    Take a look at

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

    Eurotech Inc.
    Thursday, November 10, 2011 2:11 PM
  • Bruce Eitman ,

    Hi Thanks for your reply.

    We have used the method what you have suggested. We are able to create .SRG file in SD card. When we change the new OS we are not able to see the registry what we have created in previous OS.

    Procedure: 1. Created app1 to take backup by using RegSaveKey with this application we are able to create backup file of .SRG file

    Step2: When created app2 which we are executing the app2 after new OS launch. 

     RegReplaceKey and   KernelIoControl(IOCTL_HAL_REBOOT, NULL, 0, NULL, 0, NULL);

    Does WinCE 5.0 support this method.



    Friday, November 11, 2011 11:26 AM
  • Which method do you think Windows CE 5.0 doesn't support?   It supports all that you mentioned.   Your BSP may not support the reboot.   Of course your changes won't take effect for driver loading until after you reboot.
    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG

    Eurotech Inc.
    Friday, November 11, 2011 1:01 PM