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:
我的大学同学Adam Shepherd提出一个方法,可以在build中动态地设置vista地机器和型号信息。这个系统信息页面可以显示oem信息,支持电话等等信息,例如:
在BDD2007中为vista添加oem信息_mdt
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.
尽管可以在unattend文件中修改配置,但是Manufactuer和model需要基于计算机来改变。adam使用bdd2007的扩展能力,用wmi查询改变unattend文件。这是一个很好的改变unattend文件的好例子
 
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.
这是因为bdd2007手机Make和Model信息,而不是Manufactuer和model,unattend文件使用了manufacturerhe model,因此,你只是把这个新的manufacturer属性值让bdd手机并且替换为make值,接下来把manufacturer和model放入unattend文件。相对于其他方法,这个方法刚刚合适。
 
Notes:
1. Instead of specifying 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 :-)
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.
  • 收藏
  • 评论
  • 举报
提问和评论都可以,用心的回复会被更多人看到 评论
发布评论
相关文章