Udostępnij za pośrednictwem


FBA Regmigrate Key

There exists a key under the FBA key (HKLM\System\ CCS\ Control\ WindowsEmbedded\ FBA) called the RegMigrate key. This key can be found in the registry under HKLM\System\FBA\RegMigrate.

All the sub keys under this key will be migrated to their corresponding positions during FBA at phase 6000. This allows registry keys to be overwritten after all DLL registration and RunOnce activity is finished. This was primarily created to address scenarios where SHDOCVW.DLL registration overwrites the offline authored “Start Page” values. You can specify any root keys like HKLM, HKCR, and HKCU under the RegMigrate key. Here are a couple of examples on how to use the RegMigrate key.

Example 1: Consider you want to set your computer name to “myTest" in your embedded runtime, but you have not already done that in Target Designer. Here are the steps you can follow to do this using the RegMigrate key:

1) Have your pre-fba runtime handy (the pre-fba runtime is the image built by Target Designer but not yet deployed to your target machine)
2) Open Registry Editor (regedit.exe)
3) Click on the Hkey_Local_Machine key
4) Click on File -> Load Hive from the top menu. This should take you to a browse window.
5) Browse to the location of the system.sav file in your pre-fba runtime
6) Give a name to this loaded hive say "foo". Click OK.
7) You should now see an entry called foo under the Hkey_Local_Machine key
8) Expand foo and locate the key HKLM\ System\ FBA\ RegMigrate under it.
9) Add the following entry under RegMigrate to set the computer name.
HKLM\ ControlSet\ ComputerName\ ComputerName. Under ComputerName add a new String called “ComputerName". Set the value of ComputerName to "myTest".
10) Click on foo and unload the hive by clicking File -> Unload hive from the top menu.
11) Copy this runtime image to your target machine
12) Let the machine go through FBA. Once the machine has booted you will notice that your computer name is now set to myTest.

Example 2: Your goal is to have the following entry in your registry for the USB service after FBA

HKLM\System\CCS\Services\usbhub, Start, REG_DWORD, 0.

It might so happen that during the PNP phase of the FBA, this key might get overwritten to some other value. To ensure that the USBHUB key has the value that is desired, you can use the RegMigrate key.

1) Open Registry Editor (regedit.exe)
2) Click on the Hkey_Local_Machine key
3) Click on File -> Load Hive from the top menu. This should take you to a browse window.
4) Browse to the location of the system.sav file in your pre-fba runtime
5) Give a name to this loaded hive say "foo". Click OK.
6) You should now see an entry called foo under the Hkey_Local_Machine key
7) Expand foo and locate the key HKLM\ System\ FBA\ RegMigrate under it.
8) Create a registry entry called HKLM\ System\ CCS\ Services\ usbhub under the RegMigrate key. Create a REG_DWORD entry called Start for the usbhub key and set the value to 0.
9) Click on foo and unload the hive by clicking File -> Unload hive.
10) Copy this runtime image to your target machine and go through FBA.

Once you have gone through FBA, you will notice that the usbhub registry key will have the desired value.

- Nandini