Hives and *.SAV hives

If you ever look in the pre-FBA runtimes under the .\windows\system32\config folder where the pre-setup registry hives are located you'll find duplicates of the hives. For instance, there's a SYSTEM and a SYSTEM.SAV hive.

One of the very first things FBA does when it initializes on first boot is to replace the standard hives with the *.SAV hives.

The reason for this is simple. If during FBA there is a catastrophic failure like pulling the power plug or the machine hangs and you force a reboot FBA will begin setup over again but with potentially corrupted hives or in an unknown state. FBA must replace the hives to ensure it's starting in a known state.

The reason why you might find this tidbit of knowledge useful came up during the MEDC presentation by Neil Marlow on First Boot Agent in the Q&A session. I was telling our customers about tweaks or hacks they can use to make their jobs a little easier, such as this one:

Let's say you've built a configuration and closed Target Designer and then realize you forgot to add an Administrator password for instance, or had set the wrong display resolution in the video component. Instead of having to reload the config, make changes and rebuild, you can simply load the runtime's hive offline on your dev machine, make the changes there, unload the hive and now you can deploy it to the device for testing. So instead of 10-20 minutes in TD, you spend maybe 2-3 minutes playing in the registry.

But - and this is a big BUT - you have to remember to make the changes in the SAV hive. If you make any changes in the standard hives, FBA will never see those changes you made because it's overwriting those hives with the SAV hives. So the lesson here is that if you need to make offline changes to the pre-FBA hives, do them only in the *.SAV hives.

- Andy