Freigeben über


Adding Dynamic OEM Information to a BDD 2007 Build

My colleague in MCS UK, Adam Shepherd has come up with a solution to dynamically set the machine and model information in the Windows Vista System Properties as part of the build process... the System properties page can be used to show OEM type information as well as support phone numbers and links. The section that interested Adam was:

The unattend file has entries where this information can be configured, however the Manufacturer and Model information needs to change based on the machine being built - Adam used the extensibility of BDD 2007 to configure on-the-fly changes to the unattend file based on WMI calls made at the start of the build process. This is a good example for other things that you may wish to be configured dynamically in the unattend file.

STEP1

In the ZTIConfigure.xml file in BDD 2007 Distribution\Scripts folder, you need to add these entries:

<mapping id="Manufacturer" type="xml">

<xpath removeIfBlank="Self">

<![CDATA[ //settings[@pass="specialize"]/component[@name="Microsoft-Windows-Shell-Setup"]/OEMInformation/Manufacturer ]]>

</xpath>

</mapping>

<mapping id="Model" type="xml">

<xpath removeIfBlank="Self">

<![CDATA[ //settings[@pass="specialize"]/component[@name="Microsoft-Windows-Shell-Setup"]/OEMInformation/Model ]]>

</xpath>

</mapping>

<mapping id="Manufacturer" type="ini">

<section>OEMInformation</section>

</mapping>

<mapping id="Model" type="ini">

<section>OEMInformation</section>

</mapping>

These entries tell LTI / ZTI where to add the properties “Manufacturer” and “Model” into the Unattend file.

STEP 2

You then add Manufacturer as a custom property into the customsettings.ini file and create an entry, for example:

[Settings]

Priority = Default

Properties=Manufacturer

[Default]

Manufacturer=%Make%

This is because BDD 2007 collects Make and Model, not Manufacturer and Model as part of its gather process...the Unattend file uses Manufacturer and Model....therefore, you just assign this new customer Manufacturer property to the value BDD has collected and populated into the Make variable, and then populate Manufacturer and Model in the Unattend file....there are other ways to do this, but for simplicity purposes, this method works just fine.

Notes:

1. Instead ofspecifying your custom variable in the CustomSettings.ini file with Properties=Manufacturer, you can specify this custom property in the ZTIConfigure.xml file...see the attached ZTIConfigure.xml for an example.

2. You have to have a dummy entry in your unattend file for the entries you’re populating else it doesn’t work.

3. You could alternatively add the Manufacturer as a custom property in the ZTIGather.xml...either will work fine, BDD uses both to check for which properties to collect.

4. These OEM settings are just registry entries, so it’s very easy to add them later via a post build/deployment script if you prefer.

Adam has graciously provided his updated ZTIConfigure.xml file and ZTIGather.XML file already configured :-)

Download Adams files from here...

Note - I must also pass on my sincere thanks to Anders Ahl, one of our MCS senior consultants in Sweden for his copyedit of my blogs and his dedication to ensuring that the information presented here is always up-to-date and accurate.