All Forums
 Microsoft Windows CE
 General CE
 Yet another registry question (setting persists)
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

thomaskuhn

0 Posts

Posted - 22 Sep 2006 :  09:36:29  Show Profile
I looked all around and can not find the simple answer for this, but I know it is out there somewhere. I am using a bitsyXb with the latest CE image. I want to make it a static IP, so I add the registry settings to the ADSLoad.reg file, reboot with the flash card in. Everything works great. Here is where I am getting confused. When I wanted to switch it back to DHCP, I removed the registry settings from the ADSLoad.reg file that I had originally added, and rebooted with the flash card in. I was under the asssumption that this would copy the .reg file to the flash, and once the board was booting, the initial registry (Registry that came with the image) would be loaded, then the .reg files would be processed. Since the Reg file did not contain any settings for static IP, the board would boot up in DHCP. But, to my suprise, the board comes up in Static still. It seemed to me that anything that was put in the ADSLoad.reg file was then inserted into the registry permenantly. So, does the bootloader permently store all ADSLoad.reg entries into the registry?

Tom


A.

ctacke

877 Posts

Posted - 22 Sep 2006 :  10:45:16  Show Profile  Email Poster
At boot the registry entries in ADSLOAD.REG get applied to the device registry. The device registry has support for presistence, and it's very likely that at some point the device registry was saved, saving the static IP info. So now when you boot, even though the info is not in ADSLOAD.REG, it's in the persistent registry and getting restored from there.

The way around this is to either delete the entire persistent registry or to change the IP info to DHCP and force a registry flush (sleep/wake is the easiest way to do that).
Go to Top of Page

beitman

63 Posts

Posted - 22 Sep 2006 :  10:45:56  Show Profile  Email Poster
Tom:

The entries in ADSLoad.reg are put into the registry (there is only one) and the registry is persisted in registry hives on the FlashFX Disk.

ADSload.reg is imported into the registry similar to importing a registy file in Windows XP.

So when you removed the registry setting from ADSLoad.reg, it had no effect other than to stop putting that registry entry into the registry when the system boots. But, the entry is already in the system registry and persisted to the registry hives.

You can use the RegEdit utility to remove the static IP from the registry and the run RegFlushKey.exe to persist your changes.

Summary of how the registry works:

Reset
- FileSys loads registry from OS image (nk.bin)
- FileSys loads registry hive from FlashFX Disk if it exists
- InitRegistry driver imports ADSLoad.reg into registry
- On suspend and anytime an application calls RegFlushKey() the registry is persisted to registry hives on FlashFX Disk


Bruce
Go to Top of Page

thomaskuhn

0 Posts

Posted - 22 Sep 2006 :  11:00:57  Show Profile
Ok,

I get it now, the registry is persisting. I was not sure that it was, due to the lack of the persistant storage app in the control panel. I did set it it back to DHCP by just changing the registry entries. Now the question becomes... Does the registry persist after all changes (Software installation) without doing a flush?

As a side note, ctacke, do you know that you are a god in the eyes of our CE dev team. Over the last two years, we started working on our first CE Project, and your insight on this subject is all over the internet from message boards to news groups and everything. Thanks so much for the help you have provided without even knowing it.

Tom
Go to Top of Page

beitman

63 Posts

Posted - 22 Sep 2006 :  11:10:48  Show Profile  Email Poster
Tom:

Chris is a valuable resource within the Windows CE community and ADS. He will appreciate your comments.

The registry persists only on suspend and when an application calls RegFlushKey. The touch calibration utility calls RegFlushKey after calibrating, which is after ADSLoad.reg is imported.

Bruce
Go to Top of Page

thomaskuhn

0 Posts

Posted - 22 Sep 2006 :  11:12:42  Show Profile
Thanks!
Go to Top of Page

ctacke

877 Posts

Posted - 22 Sep 2006 :  11:55:37  Show Profile  Email Poster
Keep in mind that wceload (the thing that uncompresses CAB files) also calls RegFlushKey when it's done, so installing any CAB will persist the registry too.

If you're developing managed apps from Studio, keep in mind that Studio deploys the CF and the System_SR_eenu assemblies as cabs and uncompresses them. The end result being that just deploying your app from Stuidio to the target device will persist the registry (on the first run when the references are deployed).
Go to Top of Page
  Topic  
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.03 seconds. Snitz Forums 2000