<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>The Deployment Guys : Scripts</title><link>http://blogs.technet.com/deploymentguys/archive/tags/Scripts/default.aspx</link><description>Tags: Scripts</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Approving Windows Updates in an MDT 2010 Standalone Environment from a ConfigMgr Software Update Point</title><link>http://blogs.technet.com/deploymentguys/archive/2009/10/22/approving-windows-updates-in-an-mdt-2010-standalone-environment-from-a-configmgr-software-update-point.aspx</link><pubDate>Thu, 22 Oct 2009 01:06:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3288304</guid><dc:creator>DeploymentGuys</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/deploymentguys/comments/3288304.aspx</comments><wfw:commentRss>http://blogs.technet.com/deploymentguys/commentrss.aspx?PostID=3288304</wfw:commentRss><wfw:comment>http://blogs.technet.com/deploymentguys/rsscomments.aspx?PostID=3288304</wfw:comment><description>You’ve no doubt read some of the benefits around using the Software Update Point features of ConfigMgr. However, if you are already using MDT standalone as an Image Engineering environment – there is sometimes a duplication in having to manage software...(&lt;a href="http://blogs.technet.com/deploymentguys/archive/2009/10/22/approving-windows-updates-in-an-mdt-2010-standalone-environment-from-a-configmgr-software-update-point.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3288304" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/deploymentguys/attachment/3288304.ashx" length="1498" type="application/x-zip-compressed" /><category domain="http://blogs.technet.com/deploymentguys/archive/tags/ConfigMgr/default.aspx">ConfigMgr</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Scripts/default.aspx">Scripts</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/MDT/default.aspx">MDT</category></item><item><title>Making WinPE Wait for Network in LTI Deployments</title><link>http://blogs.technet.com/deploymentguys/archive/2009/09/23/making-winpe-wait-for-network-in-lti-deployments.aspx</link><pubDate>Wed, 23 Sep 2009 21:24:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3282767</guid><dc:creator>DeploymentGuys</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.technet.com/deploymentguys/comments/3282767.aspx</comments><wfw:commentRss>http://blogs.technet.com/deploymentguys/commentrss.aspx?PostID=3282767</wfw:commentRss><wfw:comment>http://blogs.technet.com/deploymentguys/rsscomments.aspx?PostID=3282767</wfw:comment><description>&lt;P&gt;In some environments, network device drivers and/or infrastructure take longer to load than WinPE waits before running the task sequence. This can be due to congested DHCP scopes, link negotiation latency or slow loading network drivers. In these cases, it is necessary to delay the start of the task sequence until a valid IP address is obtained otherwise the task sequence will fail. &lt;/P&gt;
&lt;P&gt;In order to do this, you can create a script that will wait for a valid IP address before continuing on with the LiteTouch Wizard. The LiteTouch Wizard is launched using a RunSynchronous command in the Unattend.xml file for WinPE. MDT obtains this file from %ProgramFiles%\Microsoft Deployment Toolkit\Templates folder. Here are instructions for doing this with MDT 2008 and an x86 Boot Image &lt;STRONG&gt;(UPDATE : MDT 2010 includes a wait by default)&lt;/STRONG&gt;:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;1. Navigate to %ProgramFiles%\Microsoft Deployment Toolkit\Templates and rename the Unattend_PE_x86.xml file to Unattend_PE_x86.old&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;2. Copy the attached Unattend_PE_x86.xml file to %ProgramFiles%\Microsoft Deployment Toolkit\Templates .&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;3. Navigate to your Distribution Share&amp;nbsp;and copy the attached WinPEFiles folder there.&lt;/P&gt;
&lt;P&gt;4. Navigate to the WinPEFiles\Windows\System32 edit the file “WaitForIP.bat” replace &amp;lt;SERVERNAME&amp;gt; with the name of your WDS Server.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/MakingWinPEwaitforNetwork_F2FA/image_4.png" mce_href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/MakingWinPEwaitforNetwork_F2FA/image_4.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/MakingWinPEwaitforNetwork_F2FA/image_thumb_1.png" width=244 height=170 mce_src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/MakingWinPEwaitforNetwork_F2FA/image_thumb_1.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;5. In the Deployment Workbench ,&amp;nbsp;navigate to&amp;nbsp;the Deploy Node and right click on the LAB deploy point and&amp;nbsp;choose &lt;STRONG&gt;Properties&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;6. In the Windows PE tab under extra directory to add and Browse to the WinPEFiles folder created in step 3. Note: navigate to the WinPEFiles and not any of the sub directories. Click OK to apply the change.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/MakingWinPEwaitforNetwork_F2FA/image_8.png" mce_href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/MakingWinPEwaitforNetwork_F2FA/image_8.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/MakingWinPEwaitforNetwork_F2FA/image_thumb_3.png" width=510 height=417 mce_src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/MakingWinPEwaitforNetwork_F2FA/image_thumb_3.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;7. In the Deployment Workbench , right click on the LAB Deploy point and choose “&lt;STRONG&gt;Update”&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;This post was contributed by &lt;/EM&gt;&lt;STRONG&gt;&lt;I&gt;Aly Shivji&lt;/I&gt;&lt;/STRONG&gt;&lt;EM&gt; a consultant with Microsoft Services - U.S. East Region.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Disclaimer: The information on this site is provided "AS IS" with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the &lt;/STRONG&gt;&lt;A href="http://www.microsoft.com/info/cpyright.mspx" mce_href="http://www.microsoft.com/info/cpyright.mspx"&gt;&lt;STRONG&gt;Terms of Use&lt;/STRONG&gt;&lt;/A&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3282767" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/deploymentguys/attachment/3282767.ashx" length="1735" type="application/x-zip-compressed" /><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Scripts/default.aspx">Scripts</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/MDT/default.aspx">MDT</category></item><item><title>Using Device Aliases for Hardware Specific Application Installation</title><link>http://blogs.technet.com/deploymentguys/archive/2009/09/21/using-device-aliases-for-hardware-specific-application-installation.aspx</link><pubDate>Mon, 21 Sep 2009 12:36:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3280390</guid><dc:creator>DeploymentGuys</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.technet.com/deploymentguys/comments/3280390.aspx</comments><wfw:commentRss>http://blogs.technet.com/deploymentguys/commentrss.aspx?PostID=3280390</wfw:commentRss><wfw:comment>http://blogs.technet.com/deploymentguys/rsscomments.aspx?PostID=3280390</wfw:comment><description>&lt;P&gt;In my last &lt;A href="http://blogs.technet.com/deploymentguys/archive/2009/09/10/using-and-extending-model-aliases-for-hardware-specific-application-installation.aspx" target=_blank mce_href="http://blogs.technet.com/deploymentguys/archive/2009/09/10/using-and-extending-model-aliases-for-hardware-specific-application-installation.aspx"&gt;post&lt;/A&gt; I described how to use and extend model aliases.&amp;nbsp; In this installment I show how you can do the same thing with individual devices or groups of devices.&lt;/P&gt;
&lt;P&gt;Defining setting, applications, etc. by model works in many instances.&amp;nbsp; However, there are time when a device may or may not be installed in any particular model (e.g. broadband wireless adapter) and you may need to install an application only if the device is installed.&amp;nbsp; I had just such a need at my current customer and this led me to develop a concept of Device Aliases.&amp;nbsp; I define a Device Alias as a friendly name given to a device or groups of devices for which you want to configure the same settings, applications, etc.&lt;/P&gt;
&lt;P&gt;I used a simple version of the concept of a Device Alias in my post on &lt;A href="http://blogs.technet.com/deploymentguys/archive/2008/08/03/implementing-the-windows-xp-tablet-pc-edition-2005-single-image-deployment-supplemental-guide-process-in-mdt-2008-full-update.aspx" target=_blank mce_href="http://blogs.technet.com/deploymentguys/archive/2008/08/03/implementing-the-windows-xp-tablet-pc-edition-2005-single-image-deployment-supplemental-guide-process-in-mdt-2008-full-update.aspx"&gt;Windows XP Tablet PC Edition 2005 Single-Image Deployment&lt;/A&gt;.&amp;nbsp; The IsTablet property is actually a device alias for the defined set of digitizer devices.&amp;nbsp; IsTablet is set to True when one of the digitizer devices if present.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;[Settings] &lt;BR&gt;Priority=IsTabletCheck, Default &lt;BR&gt;Properties=MyCustomProperty, TabletPnpIds, IsTablet &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;[IsTabletCheck] &lt;BR&gt;TabletPnpIds=ACPI\WACF004,ACPI\WACF008,ACPI\MAI3310,ACPI\FUJ02E5 &lt;BR&gt;UserExit=ZTI-DetectHardwareExit.vbs &lt;BR&gt;IsTablet=#DetectDevices("%TabletPnpIds%")#&lt;/FONT&gt; &lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You could use this method as is to create additional device aliases.&amp;nbsp; However, once you have more that a few of these, the Properties line in CustomSettings.ini would become loaded with Device Alias variables.&amp;nbsp; So I took a different approach for defining multiple Device Aliases.&amp;nbsp; Before I explain, I want to note that for my new design to work you will need to fix a bug that I found in one of the MDT scripts.&amp;nbsp; I explain how to fix the script at the end of this post.&lt;/P&gt;
&lt;P&gt;I decided to design the new implementation with its own INI file called DeviceAlias.ini.&amp;nbsp; Below is a sample INI file that I created for testing this on my laptop (Lenovo T61p).&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;[HIDClass] &lt;BR&gt;WacomDigitizer=ACPI\WACF004,ACPI\WACF008 &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;[Display] &lt;BR&gt;NVIDIAQuadroFX570M=PCI\VEN_10DE&amp;amp;DEV_040C,PCI\VEN_10DE&amp;amp;CC_030000 &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;[Net] &lt;BR&gt;Intel82566MMGigabit=PCI\VEN_8086&amp;amp;DEV_1049,PCI\VEN_8086&amp;amp;CC_020000 &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;[NoPrefix] &lt;BR&gt;IsTablet=ACPI\WACF004,ACPI\WACF008,ACPI\MAI3310,ACPI\FUJ02E5 &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;[NoPrefix-Mouse] &lt;BR&gt;ThinkPadUltraNav=ACPI\IBM0057&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This INI file is organized in to sections.&amp;nbsp; The sections contain the &amp;lt;Device Alias entry&amp;gt;=&amp;lt;Plug and Play ID list&amp;gt; entries.&amp;nbsp; These section names are used in a prefix that is added to the device alias.&amp;nbsp; When the prefix is added the Device Alias is of the form Device_&amp;lt;section name&amp;gt;_&amp;lt;device alias entry&amp;gt;.&amp;nbsp; In this example, a machine with an NVIDIA Quadro FX570M display adapter would have a the Device Alias of &lt;STRONG&gt;Device_Display_NVIDIAQuadroFX570M&lt;/STRONG&gt; set to True.&amp;nbsp; I add the prefix to make it easier to find and sort Device Alias entries in the &lt;STRONG&gt;Make and Model&lt;/STRONG&gt; entries in the MDT Database.&amp;nbsp; As in the example above, I like to use the device class as the prefix.&amp;nbsp; However, the section names can be anything you want.&amp;nbsp; For Device Alias variables that you don’t want to have a prefix (&lt;STRONG&gt;IsTablet&lt;/STRONG&gt; is a good example), just begin the section name with &lt;STRONG&gt;NoPrefix&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;I have updated ZTI-DetectHardwareExit.vbs with two new functions to process the Device Alias INI file.&amp;nbsp; The first, SetDeviceAliases, reads each section in the INI file and evaluates each entry to determine if any of the Plug and Play IDs in the list for the entry is installed.&amp;nbsp; It then sets the Device Alias for that entry to True or False based on that determination.&amp;nbsp; Finally, for any Device Alias that is True (the device is present), the Device Alias is added to a list item called &lt;STRONG&gt;DeviceAlias&lt;/STRONG&gt;.&amp;nbsp; This list item is used in the database queries.&amp;nbsp; Below is an example of the CustomSettings.ini entries to use SetDeviceAliases.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;[Settings] &lt;BR&gt;Priority=SetDeviceAlias &lt;BR&gt;Properties=MyCustomProperty, SetDeviceAliases&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;[SetDeviceAlias] &lt;BR&gt;UserExit=ZTI-DetectHardwareExit.vbs &lt;BR&gt;SetDeviceAliases=#SetDeviceAliases("DeviceAlias.ini")#&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Even a Device Alias is insufficient to identify which hardware specific applications should be installed during a deployment.&amp;nbsp; At minimum, you usually also need to know the operating system version and architecture for which the applications are targeted.&amp;nbsp; For example, for an NVIDIA Quadro FX570M display adapter you would typically have one or more hardware specific applications for Windows XP x86, one for Windows Vista x86, one for Windows Vista x64, etc.&amp;nbsp; To that end I created a new composite property called &lt;STRONG&gt;DeviceOSArchAlias&lt;/STRONG&gt;. which combines the Device Alias, OSVersion, and Architecture properties.&amp;nbsp; (I refer to this property by a newly minted acronym called &lt;STRONG&gt;DOAA&lt;/STRONG&gt;.&amp;nbsp; Sounds like something Homer Simpson would say. &lt;FONT face=Wingdings&gt;J&lt;/FONT&gt; )&amp;nbsp; I create this by using another new function, SetDeviceOSArchAliases, using CustomSettings.ini entries like the ones below:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;[Settings] &lt;BR&gt;Priority=SetDeviceAlias &lt;BR&gt;Properties=MyCustomProperty, SetDeviceAliases, SetDeviceOSArchAliases &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;[SetDeviceAlias] &lt;BR&gt;UserExit=ZTI-DetectHardwareExit.vbs &lt;BR&gt;SetDeviceAliases=#SetDeviceAliases("DeviceAlias.ini")# &lt;BR&gt;SetDeviceOSArchAliases=#SetDeviceOSArchAliases("DeviceAlias.ini")#&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;SetDeviceOSArchAliases also adds the DOAA entries that are True to a list item called &lt;STRONG&gt;DeviceOSArchAlias&lt;/STRONG&gt; to be used in the database queries.&amp;nbsp; So for the DeviceAlias.ini shown above, SetDeviceOSArchAliases run on a Windows Vista x64 machine that an NVIDIA Quadro FX570M display adapter, an Intel 82566MM Gigabit ethernet adapter, and a ThinkPad UltraNav pointing device will create the following properties and list items: &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;U&gt;Device Alias Properties&lt;/U&gt; &lt;BR&gt;Device_HIDClass_WacomDigitizer = False &lt;BR&gt;Device_Display_NVIDIAQuadroFX570M = True &lt;BR&gt;Device_Net_Intel82566MMGigabit = True &lt;BR&gt;IsTablet = False &lt;BR&gt;ThinkPadUltraNav = True &lt;/P&gt;
&lt;P&gt;&lt;U&gt;DeviceAlias List Item&lt;/U&gt; &lt;BR&gt;DeviceAlias001 = Device_Display_NVIDIAQuadroFX570M &lt;BR&gt;DeviceAlias002 = Device_Net_Intel82566MMGigabit &lt;BR&gt;DeviceAlias003 = ThinkPadUltraNav &lt;/P&gt;
&lt;P&gt;&lt;U&gt;DOAA Properties&lt;/U&gt; &lt;BR&gt;DOAA_Display_NVIDIAQuadroFX570M_Vista_X64 = True &lt;BR&gt;DOAA_Net_Intel82566MMGigabit_Vista_X64 = True &lt;BR&gt;ThinkPadUltraNav_Vista_X64 = True &lt;/P&gt;
&lt;P&gt;&lt;U&gt;DeviceOSArchAlias List Item&lt;/U&gt; &lt;BR&gt;DeviceOSArchAlias001 = DOAA_Display_NVIDIAQuadroFX570M_Vista_X64 &lt;BR&gt;DeviceOSArchAlias002 = DOAA_Net_Intel82566MMGigabit_Vista_X64 &lt;BR&gt;DeviceOSArchAlias003 = ThinkPadUltraNav_Vista_X64&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;To define settings, applications, roles, etc. in the MDT Database based on either the &lt;STRONG&gt;DeviceAlias &lt;/STRONG&gt;or &lt;STRONG&gt;DeviceOSArchAlias&lt;/STRONG&gt;, enter the DeviceAlias or DeviceOSArchAlias as the &lt;STRONG&gt;Model&lt;/STRONG&gt; in the &lt;STRONG&gt;Make and Model&lt;/STRONG&gt; entries in the Database.&amp;nbsp; You can put anything you want in the the Make field in the database entries.&amp;nbsp; I enter the alias type (DeviceAlias or DeviceOSArchAlias) so that I can sort the entries by type.&amp;nbsp; Here is a screen shot with a DeviceAlias or DeviceOSArchAlias entry for a device in the Panasonic Toughbook model CF-U1 that I have been working with recently.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/UsingandExtendingModelAliasesforHardware_D9A4/Model-DeviceAlias_2.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/UsingandExtendingModelAliasesforHardware_D9A4/Model-DeviceAlias_2.jpg"&gt;&lt;IMG title=Model-DeviceAlias border=0 alt=Model-DeviceAlias src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/UsingandExtendingModelAliasesforHardware_D9A4/Model-DeviceAlias_thumb.jpg" width=244 height=113 mce_src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/UsingandExtendingModelAliasesforHardware_D9A4/Model-DeviceAlias_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You would then use CustomSettings.ini entries like the ones below.&amp;nbsp; (The DatabaseVariables section below is there because I like to use variables for the common database parameters in the other sections so that the actual values only have to be changed in the DatabaseVariables section.&amp;nbsp; Note that some lines may wrap on the screen depending on your display resolution.)&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;[Settings] &lt;BR&gt;Priority=SetDeviceAlias, DatabaseVariables, DASettings, DAPackages, DAApps, DAAdmins, DARoles, DOAASettings, DOAAPackages, DOAAApps, DOAAAdmins, DOAARoles &lt;BR&gt;Properties=MyCustomProperty, MASQLServer, MADatabase, MANetlib, MASQLShare, SetDeviceAliases, SetDeviceOSArchAliases &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;[SetDeviceAlias] &lt;BR&gt;UserExit=ZTI-DetectHardwareExit.vbs &lt;BR&gt;SetDeviceAliases=#SetDeviceAliases("DeviceAlias.ini")# &lt;BR&gt;SetDeviceOSArchAliases=#SetDeviceOSArchAliases("DeviceAlias.ini")# &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;[DatabaseVariables] &lt;BR&gt;MASQLServer=SQLS001 &lt;BR&gt;MADatabase=MDT &lt;BR&gt;MANetlib=DBNMPNTW &lt;BR&gt;MASQLShare=Logs$ &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;[DASettings] &lt;BR&gt;SQLServer=%MASQLServer% &lt;BR&gt;Database=%MADatabase% &lt;BR&gt;Netlib=%MANetlib% &lt;BR&gt;SQLShare=%MASQLShare% &lt;BR&gt;Table=MakeModelSettings &lt;BR&gt;Parameters=DeviceAlias &lt;BR&gt;DeviceAlias=Model &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;[DAPackages] &lt;BR&gt;SQLServer=%MASQLServer% &lt;BR&gt;Database=%MADatabase% &lt;BR&gt;Netlib=%MANetlib% &lt;BR&gt;SQLShare=%MASQLShare% &lt;BR&gt;Table=MakeModelPackages &lt;BR&gt;Parameters=DeviceAlias &lt;BR&gt;DeviceAlias=Model &lt;BR&gt;Order=Sequence &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;[DAApps] &lt;BR&gt;SQLServer=%MASQLServer% &lt;BR&gt;Database=%MADatabase% &lt;BR&gt;Netlib=%MANetlib% &lt;BR&gt;SQLShare=%MASQLShare% &lt;BR&gt;Table=MakeModelApplications &lt;BR&gt;Parameters=DeviceAlias &lt;BR&gt;DeviceAlias=Model &lt;BR&gt;Order=Sequence &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;[DAAdmins] &lt;BR&gt;SQLServer=%MASQLServer% &lt;BR&gt;Database=%MADatabase% &lt;BR&gt;Netlib=%MANetlib% &lt;BR&gt;SQLShare=%MASQLShare% &lt;BR&gt;Table=MakeModelAdministrators &lt;BR&gt;Parameters=DeviceAlias &lt;BR&gt;DeviceAlias=Model &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;[DARoles] &lt;BR&gt;SQLServer=%MASQLServer% &lt;BR&gt;Database=%MADatabase% &lt;BR&gt;Netlib=%MANetlib% &lt;BR&gt;SQLShare=%MASQLShare% &lt;BR&gt;Table=MakeModelRoles &lt;BR&gt;Parameters=DeviceAlias &lt;BR&gt;DeviceAlias=Model &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;[DOAASettings] &lt;BR&gt;SQLServer=%MASQLServer% &lt;BR&gt;Database=%MADatabase% &lt;BR&gt;Netlib=%MANetlib% &lt;BR&gt;SQLShare=%MASQLShare% &lt;BR&gt;Table=MakeModelSettings &lt;BR&gt;Parameters=DeviceOSArchAlias &lt;BR&gt;DeviceOSArchAlias=Model &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;[DOAAPackages] &lt;BR&gt;SQLServer=%MASQLServer% &lt;BR&gt;Database=%MADatabase% &lt;BR&gt;Netlib=%MANetlib% &lt;BR&gt;SQLShare=%MASQLShare% &lt;BR&gt;Table=MakeModelPackages &lt;BR&gt;Parameters=DeviceOSArchAlias &lt;BR&gt;DeviceOSArchAlias=Model &lt;BR&gt;Order=Sequence &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;[DOAAApps] &lt;BR&gt;SQLServer=%MASQLServer% &lt;BR&gt;Database=%MADatabase% &lt;BR&gt;Netlib=%MANetlib% &lt;BR&gt;SQLShare=%MASQLShare% &lt;BR&gt;Table=MakeModelApplications &lt;BR&gt;Parameters=DeviceOSArchAlias &lt;BR&gt;DeviceOSArchAlias=Model &lt;BR&gt;Order=Sequence &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;[DOAAAdmins] &lt;BR&gt;SQLServer=%MASQLServer% &lt;BR&gt;Database=%MADatabase% &lt;BR&gt;Netlib=%MANetlib% &lt;BR&gt;SQLShare=%MASQLShare% &lt;BR&gt;Table=MakeModelAdministrators &lt;BR&gt;Parameters=DeviceOSArchAlias &lt;BR&gt;DeviceOSArchAlias=Model &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;[DOAARoles] &lt;BR&gt;SQLServer=%MASQLServer% &lt;BR&gt;Database=%MADatabase% &lt;BR&gt;Netlib=%MANetlib% &lt;BR&gt;SQLShare=%MASQLShare% &lt;BR&gt;Table=MakeModelRoles &lt;BR&gt;Parameters=DeviceOSArchAlias &lt;BR&gt;DeviceOSArchAlias=Model&lt;/FONT&gt; &lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;In a computer replacement and/or OS change (different source and destination OS) scenario you will likely only want to set the DeviceOSArchAlias and do the DOAA database queries using a Gather step in the State Restore phase.&amp;nbsp; This is because you will almost always want the hardware specific settings, application installations, etc. based on the target model and operating system.&lt;/P&gt;
&lt;H3&gt;Fixing the Database Class Bug&lt;/H3&gt;
&lt;P&gt;As I explained earlier, there is a bug in the MDT Database class that needs to be fixed before the database queries above will work.&amp;nbsp; If a parameter in the database section is a list item like DeviceOSArchAlias, then the Database class Query function does not use the translated column name (Model in this case) and the query fails.&lt;/P&gt;
&lt;P&gt;The problem appears in line 2691 in the MDT 2008 Update 1 version of ZTIUtility.vbs or line 549 in the MDT 2010 RTW version of ZTIDataAccess.vbs .&amp;nbsp; This line is:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;tmpClause = sElement &amp;amp; " IN ("&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The query works if the line is changed to:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;tmpClause = sColumn &amp;amp; " IN ("&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you need to make this change, be sure to edit not only the copies in your current deployment shares but also edit the copy in %ProgramFiles%\Microsoft Deployment Toolkit\Templates\Distribution\Scripts so that new deployment shares will get the fix as well.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Disclaimer: The information on this site is provided "AS IS" with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the &lt;/STRONG&gt;&lt;A href="http://www.microsoft.com/info/cpyright.mspx" mce_href="http://www.microsoft.com/info/cpyright.mspx"&gt;&lt;STRONG&gt;Terms of Use&lt;/STRONG&gt;&lt;/A&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This post was contributed by &lt;B&gt;Michael Murgolo,&lt;/B&gt; a Senior Consultant with Microsoft Services - U.S. East Region.&lt;/EM&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3280390" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/deploymentguys/attachment/3280390.ashx" length="5046" type="application/x-zip-compressed" /><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Scripts/default.aspx">Scripts</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/MDT/default.aspx">MDT</category></item><item><title>Using and Extending Model Aliases for Hardware Specific Application Installation</title><link>http://blogs.technet.com/deploymentguys/archive/2009/09/10/using-and-extending-model-aliases-for-hardware-specific-application-installation.aspx</link><pubDate>Thu, 10 Sep 2009 11:30:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3279639</guid><dc:creator>DeploymentGuys</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/deploymentguys/comments/3279639.aspx</comments><wfw:commentRss>http://blogs.technet.com/deploymentguys/commentrss.aspx?PostID=3279639</wfw:commentRss><wfw:comment>http://blogs.technet.com/deploymentguys/rsscomments.aspx?PostID=3279639</wfw:comment><description>&lt;P&gt;In a post on his blog from a few years ago (found &lt;A href="http://blogs.technet.com/benhunter/archive/2007/03/28/bdd-2007-tips-creating-model-aliases.aspx" target=_blank mce_href="http://blogs.technet.com/benhunter/archive/2007/03/28/bdd-2007-tips-creating-model-aliases.aspx"&gt;here&lt;/A&gt;) Ben Hunter described a method of creating and using model aliases using BDD/MDT User Exit scripts.&amp;nbsp; A model alias is a friendly name assigned to cover multiple model variations in a manufacturer’s computer model family.&amp;nbsp; I have been going through this exercise for my current customer and have found some limitations to using Ben’s process exactly as is.&lt;/P&gt;
&lt;P&gt;First, the MDT properties &lt;STRONG&gt;Make&lt;/STRONG&gt; and &lt;STRONG&gt;Model&lt;/STRONG&gt; (which come from the &lt;STRONG&gt;Manufacturer&lt;/STRONG&gt; and &lt;STRONG&gt;Model&lt;/STRONG&gt; properties of the &lt;A href="http://msdn.microsoft.com/en-us/library/aa394102(VS.85).aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/aa394102(VS.85).aspx"&gt;&lt;STRONG&gt;Win32_ComputerSystem&lt;/STRONG&gt;&lt;/A&gt; WMI class) are no longer sufficient or necessarily the most convenient properties for determining the model alias.&amp;nbsp; For example, distinguishing between Microsoft’s different types of virtual machines (Virtual PC, Virtual Server, Hyper-V) requires looking at &lt;STRONG&gt;Version&lt;/STRONG&gt; property of the &lt;A href="http://msdn.microsoft.com/en-us/library/aa394077(VS.85).aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/aa394077(VS.85).aspx"&gt;&lt;STRONG&gt;Win32_BIOS&lt;/STRONG&gt;&lt;/A&gt; WMI class.&amp;nbsp; Also, many current Lenovo computer models already have the &lt;STRONG&gt;Version&lt;/STRONG&gt; property of the &lt;A href="http://msdn.microsoft.com/en-us/library/aa394105(VS.85).aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/aa394105(VS.85).aspx"&gt;&lt;STRONG&gt;Win32_ComputerSystemProduct&lt;/STRONG&gt;&lt;/A&gt; WMI class filled in with a friendly name for the model.&amp;nbsp; Here is a sample of a User Exit script with an expanded &lt;STRONG&gt;SetModelAlias&lt;/STRONG&gt; function that uses this additional information. (Note that some lines may wrap on the screen depending on your display resolution.)&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;Function UserExit(sType, sWhen, sDetail, bSkip) &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oLogging.CreateEntry "USEREXIT:ModelAliasExit.vbs started: " &amp;amp; sType &amp;amp; " " &amp;amp; sWhen &amp;amp; " " &amp;amp; sDetail, LogTypeInfo &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; UserExit = Success &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;End Function &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;Function SetModelAlias() &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oLogging.CreateEntry "------------ Initialization USEREXIT:ModelAliasExit.vbs|SetModelAlias -------------", LogTypeInfo &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sMake = oEnvironment.Item("Make") &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sModel = oEnvironment.Item("Model") &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SetModelAlias = "" &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sCSPVersion = "" &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sBIOSVersion = "" &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set colComputerSystemProduct = objWMI.ExecQuery("SELECT * FROM Win32_ComputerSystemProduct") &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Err then &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oLogging.CreateEntry "Error querying Win32_ComputerSystemProduct: " &amp;amp; Err.Description &amp;amp; " (" &amp;amp; Err.Number &amp;amp; ")", LogTypeError &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Else &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Each objComputerSystemProduct in colComputerSystemProduct &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If not IsNull(objComputerSystemProduct.Version) then &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sCSPVersion = Trim(objComputerSystemProduct.Version) &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oLogging.CreateEntry "USEREXIT:ModelAliasExit.vbs|SetModelAlias - Win32_ComputerSystemProduct Version: " &amp;amp; sCSPVersion, LogTypeInfo &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End if &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set colBIOS = objWMI.ExecQuery("SELECT * FROM Win32_BIOS") &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Err then &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oLogging.CreateEntry "Error querying Win32_BIOS: " &amp;amp; Err.Description &amp;amp; " (" &amp;amp; Err.Number &amp;amp; ")", LogTypeError &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Else &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Each objBIOS in colBIOS &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If not IsNull(objBIOS.Version) then &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sBIOSVersion = Trim(objBIOS.Version) &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oLogging.CreateEntry "USEREXIT:ModelAliasExit.vbs|SetModelAlias - Win32_BIOS Version: " &amp;amp; sBIOSVersion, LogTypeInfo &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End if &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Check by Make &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Select Case sMake &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case "Dell Computer Corporation", "Dell Inc.", "Dell Computer Corp." &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Use Model with spaces removed &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SetModelAlias = Replace(sModel, " ", "") &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case "IBM", "LENOVO" &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Check by Version property of the Win32_ComputerSystemProduct WMI class first &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Not sCSPVersion = "" Then &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Select Case sCSPVersion &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case "ThinkPad T61p" &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SetModelAlias = "ThinkPadT61" &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case Else &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Use Version with spaces removed &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SetModelAlias = Replace(sCSPVersion, " ", "") &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Select &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Check by first 4 characters of the Model &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If SetModelAlias = "" Then &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sModelSubString = Left(sModel,4) &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Select Case sModelSubString &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case "1706" &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SetModelAlias = "ThinkPadX60" &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case Else &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SetModelAlias = sModel &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oLogging.CreateEntry "USEREXIT:ModelAliasExit.vbs|SetModelAlias - Alias rule not found.&amp;nbsp; ModelAlias set to Model value." , LogTypeInfo &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Select &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case "Matsushita Electric Industrial Co.,Ltd." &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Left(sModel,5) = "CF-U1" Then &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SetModelAlias = "CF-U1" &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Else &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SetModelAlias = sModel &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oLogging.CreateEntry "USEREXIT:ModelAliasExit.vbs|SetModelAlias - Alias rule not found.&amp;nbsp; ModelAlias set to Model value." , LogTypeInfo &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case "Microsoft Corporation" &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Microsoft virtualization technology detected, assign defaults &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SetModelAlias = "Hyper-V" &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Try to determine more specific values using Version property of the Win32_BIOS WMI class &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Select Case sBIOSVersion &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case "VRTUAL - 1000831" &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SetModelAlias = "Hyper-VBetaorRC0" &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case "VRTUAL - 5000805", "BIOS Date: 05/05/08 20:35:56&amp;nbsp; Ver: 08.00.02" &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SetModelAlias = "Hyper-V" &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case "A M I&amp;nbsp; - 2000622" &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SetModelAlias = "VS2005R2SP1orVPC2007" &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case "A M I&amp;nbsp; - 9000520" &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SetModelAlias = "VS2005R2" &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case "A M I&amp;nbsp; - 9000816", "A M I&amp;nbsp; - 6000901" &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SetModelAlias = "WindowsVirtualPC" &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case "A M I&amp;nbsp; - 8000314" &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SetModelAlias = "VS2005orVPC2004" &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case Else &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SetModelAlias = sModel &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oLogging.CreateEntry "USEREXIT:ModelAliasExit.vbs|SetModelAlias - Alias rule not found.&amp;nbsp; ModelAlias set to Model value." , LogTypeInfo &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Select &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case "VMware, Inc." &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SetModelAlias = "VMware" &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case Else &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Instr(sModel, "(") &amp;gt; 2 Then &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SetModelAlias = Trim(Left(sModel, Instr(sModel, "(") - 2)) &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Else &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SetModelAlias = sModel &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oLogging.CreateEntry "USEREXIT:ModelAliasExit.vbs|SetModelAlias - Alias rule not found.&amp;nbsp; ModelAlias set to Model value." , LogTypeInfo &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End if &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Select &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oLogging.CreateEntry "USEREXIT:ModelAliasExit.vbs|SetModelAlias - ModelAlias has been set to " &amp;amp; SetModelAlias, LogTypeInfo &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oLogging.CreateEntry "------------ Departing USEREXIT:ModelAliasExit.vbs|SetModelAlias -------------", LogTypeInfo &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;End Function&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Second, even a model alias is insufficient to identify which hardware specific applications should be installed during a deployment.&amp;nbsp; At minimum, you usually also need to know the operating system version and architecture for which the applications are targeted.&amp;nbsp; For example, for a Lenovo T61 you would typically have one hardware specific application list for Windows XP x86, one list for Windows Vista x86, one list for Windows Vista x64, etc.&amp;nbsp; To that end I created a new composite property called &lt;STRONG&gt;ModelOSArchAlias&lt;/STRONG&gt;. which combines the ModelAlias, OSVersion, and Architecture properties.&amp;nbsp; (I refer to this property by a newly minted acronym called &lt;STRONG&gt;MOAA&lt;/STRONG&gt;.&amp;nbsp; Catchy, isn’t it. &lt;FONT size=2 face=Wingdings&gt;J&lt;/FONT&gt; )&amp;nbsp; I create this by using CustomSettings.ini entries like the ones below:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;[Settings] &lt;BR&gt;Priority=SetModelAlias, Default &lt;BR&gt;Properties=MyCustomProperty, ModelAlias, ModelOSArchAlias &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;[SetModelAlias] &lt;BR&gt;UserExit=ModelAliasExit.vbs &lt;BR&gt;ModelAlias=#SetModelAlias()# &lt;BR&gt;ModelOSArchAlias=%ModelAlias%_%OSVersion%_%Architecture%&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So for a Lenovo ThinkPad X60 running 32-bit Windows Vista using my &lt;STRONG&gt;SetModelAlias&lt;/STRONG&gt; function and this CustomSettings.ini, the &lt;STRONG&gt;MOAA&lt;/STRONG&gt; would be &lt;STRONG&gt;ThinkPadX60_Vista_X86&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;To define settings, applications, roles, etc. in the MDT Database based on either the &lt;STRONG&gt;ModelAlias&lt;/STRONG&gt; or &lt;STRONG&gt;ModelOSArchAlias&lt;/STRONG&gt;, enter the ModelAlias or ModelOSArchAlias as the &lt;STRONG&gt;Model&lt;/STRONG&gt; in the &lt;STRONG&gt;Make and Model&lt;/STRONG&gt; entries in the Database.&amp;nbsp; You can put anything you want in the the Make field in the database entries.&amp;nbsp; I enter the alias type (ModelAlias or ModelOSArchAlias) so that I can sort the entries by type.&amp;nbsp; Here is a screen shot with a ModelAlias and ModelOSArchAlias entry for the Panasonic Toughbook model CF-U1 that I have been working with recently.&amp;nbsp; (Ignore the DeviceAlias and DeviceOSArchAlias entries.&amp;nbsp; I’ll describe those in my next post.&amp;nbsp; &lt;FONT size=2 face=Wingdings&gt;J&lt;/FONT&gt; )&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/UsingandExtendingModelAliasesforHardware_D9A4/Model-DeviceAlias_2.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/UsingandExtendingModelAliasesforHardware_D9A4/Model-DeviceAlias_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=Model-DeviceAlias border=0 alt=Model-DeviceAlias src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/UsingandExtendingModelAliasesforHardware_D9A4/Model-DeviceAlias_thumb.jpg" width=244 height=113 mce_src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/UsingandExtendingModelAliasesforHardware_D9A4/Model-DeviceAlias_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You would then use CustomSettings.ini entries like the ones below.&amp;nbsp; (The DatabaseVariables section below is there because I like to use variables for the common database parameters in the other sections so that the actual values only have to be changed in the DatabaseVariables section.&amp;nbsp; Note that some lines may wrap on the screen depending on your display resolution.)&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;[Settings] &lt;BR&gt;Priority=SetModelAlias, DatabaseVariables, MASettings, MAPackages, MAApps, MAAdmins, MARoles, MOAASettings, MOAAPackages, MOAAApps, MOAAAdmins, MOAARoles &lt;BR&gt;Properties=MyCustomProperty, MASQLServer, MADatabase, MANetlib, MASQLShare, ModelAlias, ModelOSArchAlias &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;[SetModelAlias] &lt;BR&gt;UserExit=ModelAliasExit.vbs &lt;BR&gt;ModelAlias=#SetModelAlias()# &lt;BR&gt;ModelOSArchAlias=%ModelAlias%_%OSVersion%_%Architecture% &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;[DatabaseVariables] &lt;BR&gt;MASQLServer=SQLS001 &lt;BR&gt;MADatabase=MDT &lt;BR&gt;MANetlib=DBNMPNTW &lt;BR&gt;MASQLShare=Logs$&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;[MASettings] &lt;BR&gt;SQLServer=%MASQLServer% &lt;BR&gt;Database=%MADatabase% &lt;BR&gt;Netlib=%MANetlib% &lt;BR&gt;SQLShare=%MASQLShare% &lt;BR&gt;Table=MakeModelSettings &lt;BR&gt;Parameters=ModelAlias &lt;BR&gt;ModelAlias=Model &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;[MAPackages] &lt;BR&gt;SQLServer=%MASQLServer% &lt;BR&gt;Database=%MADatabase% &lt;BR&gt;Netlib=%MANetlib% &lt;BR&gt;SQLShare=%MASQLShare% &lt;BR&gt;Table=MakeModelPackages &lt;BR&gt;Parameters=ModelAlias &lt;BR&gt;ModelAlias=Model &lt;BR&gt;Order=Sequence &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;[MAApps] &lt;BR&gt;SQLServer=%MASQLServer% &lt;BR&gt;Database=%MADatabase% &lt;BR&gt;Netlib=%MANetlib% &lt;BR&gt;SQLShare=%MASQLShare% &lt;BR&gt;Table=MakeModelApplications &lt;BR&gt;Parameters=ModelAlias &lt;BR&gt;ModelAlias=Model &lt;BR&gt;Order=Sequence &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;[MAAdmins] &lt;BR&gt;SQLServer=%MASQLServer% &lt;BR&gt;Database=%MADatabase% &lt;BR&gt;Netlib=%MANetlib% &lt;BR&gt;SQLShare=%MASQLShare% &lt;BR&gt;Table=MakeModelAdministrators &lt;BR&gt;Parameters=ModelAlias &lt;BR&gt;ModelAlias=Model &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;[MARoles] &lt;BR&gt;SQLServer=%MASQLServer% &lt;BR&gt;Database=%MADatabase% &lt;BR&gt;Netlib=%MANetlib% &lt;BR&gt;SQLShare=%MASQLShare% &lt;BR&gt;Table=MakeModelRoles &lt;BR&gt;Parameters=ModelAlias &lt;BR&gt;ModelAlias=Model &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;[MOAASettings] &lt;BR&gt;SQLServer=%MASQLServer% &lt;BR&gt;Database=%MADatabase% &lt;BR&gt;Netlib=%MANetlib% &lt;BR&gt;SQLShare=%MASQLShare% &lt;BR&gt;Table=MakeModelSettings &lt;BR&gt;Parameters=ModelOSArchAlias &lt;BR&gt;ModelOSArchAlias=Model &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;[MOAAPackages] &lt;BR&gt;SQLServer=%MASQLServer% &lt;BR&gt;Database=%MADatabase% &lt;BR&gt;Netlib=%MANetlib% &lt;BR&gt;SQLShare=%MASQLShare% &lt;BR&gt;Table=MakeModelPackages &lt;BR&gt;Parameters=ModelOSArchAlias &lt;BR&gt;ModelOSArchAlias=Model &lt;BR&gt;Order=Sequence &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;[MOAAApps] &lt;BR&gt;SQLServer=%MASQLServer% &lt;BR&gt;Database=%MADatabase% &lt;BR&gt;Netlib=%MANetlib% &lt;BR&gt;SQLShare=%MASQLShare% &lt;BR&gt;Table=MakeModelApplications &lt;BR&gt;Parameters=ModelOSArchAlias &lt;BR&gt;ModelOSArchAlias=Model &lt;BR&gt;Order=Sequence &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;[MOAAAdmins] &lt;BR&gt;SQLServer=%MASQLServer% &lt;BR&gt;Database=%MADatabase% &lt;BR&gt;Netlib=%MANetlib% &lt;BR&gt;SQLShare=%MASQLShare% &lt;BR&gt;Table=MakeModelAdministrators &lt;BR&gt;Parameters=ModelOSArchAlias &lt;BR&gt;ModelOSArchAlias=Model &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console"&gt;[MOAARoles] &lt;BR&gt;SQLServer=%MASQLServer% &lt;BR&gt;Database=%MADatabase% &lt;BR&gt;Netlib=%MANetlib% &lt;BR&gt;SQLShare=%MASQLShare% &lt;BR&gt;Table=MakeModelRoles &lt;BR&gt;Parameters=ModelOSArchAlias &lt;BR&gt;ModelOSArchAlias=Model &lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;In a computer replacement and/or OS change (different source and destination OS) scenario you will likely only want to set the ModelOSArchAlias and do the MOAA database queries using a Gather step in the State Restore phase.&amp;nbsp; This is because you will almost always want to hardware specific settings, application installations, etc. based on the target model and operating system.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Disclaimer: The information on this site is provided "AS IS" with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the &lt;/STRONG&gt;&lt;A href="http://www.microsoft.com/info/cpyright.mspx" mce_href="http://www.microsoft.com/info/cpyright.mspx"&gt;&lt;STRONG&gt;Terms of Use&lt;/STRONG&gt;&lt;/A&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This post was contributed by &lt;B&gt;Michael Murgolo,&lt;/B&gt; a Senior Consultant with Microsoft Services - U.S. East Region.&lt;/EM&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3279639" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/deploymentguys/attachment/3279639.ashx" length="3007" type="application/x-zip-compressed" /><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Scripts/default.aspx">Scripts</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/MDT/default.aspx">MDT</category></item><item><title>Keeping An Eye On USMT Progress v0.2</title><link>http://blogs.technet.com/deploymentguys/archive/2009/09/02/keeping-an-eye-on-usmt-progress-v0-2.aspx</link><pubDate>Wed, 02 Sep 2009 18:41:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3278746</guid><dc:creator>Daniel Oxley</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.technet.com/deploymentguys/comments/3278746.aspx</comments><wfw:commentRss>http://blogs.technet.com/deploymentguys/commentrss.aspx?PostID=3278746</wfw:commentRss><wfw:comment>http://blogs.technet.com/deploymentguys/rsscomments.aspx?PostID=3278746</wfw:comment><description>&lt;P&gt;Back in June I &lt;A href="http://blogs.technet.com/deploymentguys/archive/2009/06/26/keeping-an-eye-on-usmt-progress.aspx" mce_href="http://blogs.technet.com/deploymentguys/archive/2009/06/26/keeping-an-eye-on-usmt-progress.aspx"&gt;posted&lt;/A&gt; a script that I’d written that displays the progress of the USMT capture and recover phases in a neat HTML window off to one side of the screen; particularly useful if you are capturing/recovering large amounts of data because otherwise it looked like the USMT progress had hung due to the progress bar not moving along for quite some time.&lt;/P&gt;
&lt;P&gt;While the script I wrote worked fine I was not 100% happy with it, mostly because it ate up too many CPU cycles, which could sometimes slow down the actual USMT progress; an effect that you would never want to happen!&amp;nbsp; The problem was that there was no quick and easy way to parse the last few lines of a text file in VBScript without first reading in all the previous lines.&amp;nbsp; This meant that as the log file grew, my script took longer and longer to run.&amp;nbsp; So, I took it back to the drawing board, and reworked the innards of it to produce version 0.2!&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/KeepingAnEyeOnUSMTProgress2_F67E/shot_2.jpg" mce_href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/KeepingAnEyeOnUSMTProgress2_F67E/shot_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: block; FLOAT: none; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; MARGIN-LEFT: auto; BORDER-LEFT-WIDTH: 0px; MARGIN-RIGHT: auto" title=shot border=0 alt=shot src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/KeepingAnEyeOnUSMTProgress2_F67E/shot_thumb.jpg" width=334 height=154 mce_src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/KeepingAnEyeOnUSMTProgress2_F67E/shot_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;This time, the script runs extremely quickly and it will barely register on the CPU, meaning that it shouldn’t slow anything else down.&amp;nbsp; It still requires the same parameters to be passed to it when adding to the task sequence, which are detailed below.&amp;nbsp; To add it to the task sequence, simply add the following &lt;STRONG&gt;Run Command Line&lt;/STRONG&gt; action before the USMT capture or restore actions (or both):&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;cmd.exe /c “start /MIN cscript.exe Z:\Scripts\CUSTOM_USMT_Tracker.vbs C:\MININT\SMSOSD\OSDLOGS\USMTCapture.prg”&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;cmd.exe /c “start /MIN cscript.exe Z:\Scripts\CUSTOM_USMT_Tracker.vbs C:\MININT\SMSOSD\OSDLOGS\USMTRestore.prg”&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It also has one other very important dependency.&amp;nbsp; You must download &lt;STRONG&gt;tail.exe&lt;/STRONG&gt; from the Windows Resource Kit and place it in the Tools folder of the MDT deployment share, along with this script.&amp;nbsp; You can get the tool &lt;A href="http://www.microsoft.com/downloads/details.aspx?DisplayLang=en&amp;amp;FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd" mce_href="http://www.microsoft.com/downloads/details.aspx?DisplayLang=en&amp;amp;FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd"&gt;here&lt;/A&gt;, it doesn’t matter that it is the 2003 version, I have tested it on Windows 7 and it works fine.&amp;nbsp; If you don’t put tail.exe in the tools folder, then the script will fail.&lt;/P&gt;
&lt;P&gt;The next update might take a while to get round to doing, but I want to remove the requirements for the command-line parameter, and have the script find the progress file on it’s own.&amp;nbsp; Also, it would be good to display more information rather than just the current position in the progress, perhaps an extra line that informs what the current task is that is being run.&amp;nbsp; Also, a few cosmetic changes wouldn't go amiss, but I am a techie not a graphic designer!&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Attached to this post is the script file.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;/EM&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This post was contributed by &lt;STRONG&gt;Daniel Oxley&lt;/STRONG&gt; a consultant with Microsoft Consulting Services Spain&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Disclaimer: The information on this site is provided "AS IS" with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the &lt;/STRONG&gt;&lt;A href="http://www.microsoft.com/info/cpyright.mspx" mce_href="http://www.microsoft.com/info/cpyright.mspx"&gt;&lt;STRONG&gt;Terms of Use&lt;/STRONG&gt;&lt;/A&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3278746" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/deploymentguys/attachment/3278746.ashx" length="2751" type="application/octet-stream" /><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Scripts/default.aspx">Scripts</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Utilities/default.aspx">Utilities</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Tips+and+Tricks/default.aspx">Tips and Tricks</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/MDT/default.aspx">MDT</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/USMT/default.aspx">USMT</category></item><item><title>Location Deployment Wizard for ConfigMgr 2007</title><link>http://blogs.technet.com/deploymentguys/archive/2009/08/17/location-deployment-wizard-for-configmgr-2007.aspx</link><pubDate>Mon, 17 Aug 2009 19:37:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3274244</guid><dc:creator>DeploymentGuys</dc:creator><slash:comments>7</slash:comments><comments>http://blogs.technet.com/deploymentguys/comments/3274244.aspx</comments><wfw:commentRss>http://blogs.technet.com/deploymentguys/commentrss.aspx?PostID=3274244</wfw:commentRss><wfw:comment>http://blogs.technet.com/deploymentguys/rsscomments.aspx?PostID=3274244</wfw:comment><description>&lt;P&gt;When working on deployment projects, there is often a requirement for a workstation to be customised on a location by location basis. Common workstation customisations which are applied in this manner include: &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Localisation settings (locales, keyboard settings, time zones, Windows (Windows Vista/Windows 7) language injection &lt;/LI&gt;
&lt;LI&gt;Domain membership/organisational unit join information &lt;/LI&gt;
&lt;LI&gt;Location based applications to be installed &lt;/LI&gt;
&lt;LI&gt;Site or location based administrator groups or accounts that need to added to the local administrators group &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;The Microsoft Deployment Toolkit (MDT) and its accompanying database offers features to tailor a workstation based on its location during a deployment. The MDT Database allows locations to be defined and a set of location specific settings can be stored against each entry. When a workstation is been deployed, an MDT database lookup determines its location and collects the relevant build settings for that location. The location is determined by carrying out a lookup of the default gateway on the target workstations assigned NIC against default gateways assigned to locations in the MDT Database. To learn more about the Microsoft Deployment Toolkit and the database supplied with MDT see &lt;A title=http://technet.microsoft.com/en-us/solutionaccelerators/dd407791.aspx href="http://technet.microsoft.com/en-us/solutionaccelerators/dd407791.aspx" mce_href="http://technet.microsoft.com/en-us/solutionaccelerators/dd407791.aspx"&gt;http://technet.microsoft.com/en-us/solutionaccelerators/dd407791.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;During a mass deployment it is quite common for workstations to be built in central locations and then to be shipped to other sites for use. In these circumstances, the MDT Database location functionality&amp;nbsp;may not be as useful as any database location lookups will return settings for the site at which the workstations are being built and not the site to which the workstation will be eventually shipped. &lt;/P&gt;
&lt;P&gt;A solution to this is to&amp;nbsp;use a location deployment wizard when using the MDT Database along with System Center Configuration Management (ConfigMgr) 2007 Operating System deployments (OSD) in zero touch scenarios. A location deployment wizard is an HTA that is displayed to the user/build engineer at the start of the workstation deployment process to display the location in which they are currently situated. If the location is the site at which the workstation will be based they can click next and the deployment will continue applying all the deployment settings for that site. However, the wizard allows an “override” for the detected location and allow the user/build engineer to select another location from the MDT Database. Overriding the detected location will apply all of the selected location deployment settings from the MDT Database to the workstation despite it not being at that location. This solution allows workstations to be built in a central location whilst being fully customised for their destination locations.&lt;/P&gt;
&lt;P&gt;The location deployment wizard is an HTA that is stored in a customised ConfigMgr OSD boot image and is executed before a ConfigMgr task sequence starts. The HTA uses Operating System Media Pre-Execution Hooks (&lt;A href="http://technet.microsoft.com/en-us/library/bb694075.aspx" mce_href="http://technet.microsoft.com/en-us/library/bb694075.aspx"&gt;http://technet.microsoft.com/en-us/library/bb694075.aspx&lt;/A&gt;) to place itself before the task sequence window. The location deployment wizard allows inputs that are stored as a ConfigMgr task sequence variable. The location variable can then be used by a ConfigMgr deployment task sequence to recover settings from the MDT Database throughout the deployment (During ZTIGather phase).&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/LocationBasedWizardforConfigMgr2007_6F39/Location%20Wizard%2001_4.png" mce_href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/LocationBasedWizardforConfigMgr2007_6F39/Location%20Wizard%2001_4.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="Location Wizard 01" border=0 alt="Location Wizard 01" src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/LocationBasedWizardforConfigMgr2007_6F39/Location%20Wizard%2001_thumb_1.png" width=398 height=372 mce_src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/LocationBasedWizardforConfigMgr2007_6F39/Location%20Wizard%2001_thumb_1.png"&gt;&lt;/A&gt; &lt;A href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/LocationBasedWizardforConfigMgr2007_6F39/Location%20Wizard%2002_6.png" mce_href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/LocationBasedWizardforConfigMgr2007_6F39/Location%20Wizard%2002_6.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="Location Wizard 02" border=0 alt="Location Wizard 02" src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/LocationBasedWizardforConfigMgr2007_6F39/Location%20Wizard%2002_thumb_2.png" width=399 height=371 mce_src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/LocationBasedWizardforConfigMgr2007_6F39/Location%20Wizard%2002_thumb_2.png"&gt;&lt;/A&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;H4&gt;&lt;/H4&gt;
&lt;H4&gt;Pre-Requisites&lt;/H4&gt;
&lt;P&gt;The following pre-requirements should be configured in your deployment environment:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;System Center Configuration Management 2007 (RTM, SP1, R2 or SP2 beta) environment configured for OSD deployments. &lt;/LI&gt;
&lt;LI&gt;Microsoft Deployment Toolkit 2008 / MDT 2010 Workbench + Database hosted on Microsoft SQL 2005 or 2008 (Express / Standard / Enterprise) &lt;/LI&gt;
&lt;LI&gt;ConfigMgr 2007 console with integrated MDT console functions &lt;/LI&gt;
&lt;LI&gt;The MS SQL Database hosting the MDT Database should be configured to allow NamedPipes &lt;/LI&gt;
&lt;LI&gt;A share should be setup on the MDT Database server for authentication when using NamedPipes from a WinPE environment by using the SQLShare$ method. &lt;/LI&gt;
&lt;LI&gt;ConfigMgr “Network Access Account” should have db_datareader access to the MDT SQL Database &lt;/LI&gt;
&lt;LI&gt;Another AD account should be created which&amp;nbsp;is assigned&amp;nbsp;db_datareader access to the MDT Database. &lt;B&gt;Note This account will be stored in a plain text file in the ConfigMgr OSD Boot image. This account should be limited to just db_datareader access on the MDT SQL Server and denied all other rights on the domain&lt;/B&gt; &lt;/LI&gt;&lt;/UL&gt;
&lt;H4&gt;Location Deployment Wizard Setup Steps&lt;/H4&gt;
&lt;P&gt;Download the location deployment wizard attached to this post and extract the files to a temporary location on the computer/server which has a ConfigMgr 2007 Console with integrated MDT console functions. There are 4 components which need to be configured in your environment for this solution to operate:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Configure the Bootstap.ini file&lt;B&gt;&lt;/B&gt; &lt;/LI&gt;
&lt;LI&gt;Create a custom boot image&lt;B&gt;&lt;/B&gt; &lt;/LI&gt;
&lt;LI&gt;Configure Location settings in the MDT Database&lt;B&gt;&lt;/B&gt; &lt;/LI&gt;
&lt;LI&gt;Configure CustomSettings.ini file&lt;B&gt;&lt;/B&gt; &lt;/LI&gt;&lt;/OL&gt;
&lt;H5&gt;1. Configure the Bootstrap.ini file&lt;/H5&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;The Bootstrap.ini file contains the settings required by the Location Deployment Wizard to make the initial connection to the MDT Database. These settings need to be configured for your environment:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Edit the Bootstrap.ini file in the &lt;B&gt;Location Deployment Wizard\LocationDeploymentWizard&lt;/B&gt; folder. This file is used by the location deployment wizard HTA to connect to the MDT Database for the first time:&lt;B&gt;&lt;/B&gt; 
&lt;UL&gt;
&lt;LI&gt;Replace &amp;lt;USERNAME&amp;gt; with the AD account created for reading the MDT Database in the pre-requirements e.g. CONTOSO\MDTDBReader&lt;B&gt;&lt;/B&gt; &lt;/LI&gt;
&lt;LI&gt;Replace &amp;lt;PASSWORD&amp;gt; with the password of the account entered above&lt;B&gt;&lt;/B&gt; &lt;/LI&gt;
&lt;LI&gt;Replace &amp;lt;SQL SHARE FOR AUTHENTICATION&amp;gt; with the name of a shared folder on the MDT Database server e.g. \\MDT01.contoso.com\SQLShare$&lt;B&gt;&lt;/B&gt; &lt;/LI&gt;
&lt;LI&gt;Replace &amp;lt;MDT DATABASE SEVER&amp;gt; with the fully qualified domain name of the MDT Database server e.g. mdt01.contoso.com&lt;B&gt;&lt;/B&gt; &lt;/LI&gt;
&lt;LI&gt;Replace &amp;lt;MDT DATABASE NAME&amp;gt; should be replaced with the instance name of the MDT Database in SQL e.g. MDTDB&lt;B&gt;&lt;/B&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;H5&gt;2. Create a custom boot image&lt;/H5&gt;
&lt;P&gt;During OSD deployments a WinPE boot image provides the environment for deploying a workstation. ConfigMgr 2007 provides default boot images in the &lt;B&gt;Operating System Deployment -&amp;gt; Boot Images &lt;/B&gt;node in the console. A new custom boot image needs to be generated containing the location deployment wizard HTA and its supporting files – this will execute when the boot image first loads on a workstation:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Create a new custom boot image in the ConfigMgr console using the “Create Boot Image Using Microsoft Deployment” wizard: &lt;/LI&gt;&lt;/UL&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/LocationBasedWizardforConfigMgr2007_6F39/Location%20Wizard%2003_2.png" mce_href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/LocationBasedWizardforConfigMgr2007_6F39/Location%20Wizard%2003_2.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="Location Wizard 03" border=0 alt="Location Wizard 03" src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/LocationBasedWizardforConfigMgr2007_6F39/Location%20Wizard%2003_thumb.png" width=531 height=419 mce_src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/LocationBasedWizardforConfigMgr2007_6F39/Location%20Wizard%2003_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;UL&gt;
&lt;LI&gt;Follow the wizard, selecting the default options. On the &lt;B&gt;Image Options&lt;/B&gt; page set the &lt;B&gt;Extra Folder to Add&lt;/B&gt; as the &lt;B&gt;Location Deployment Wizard&lt;/B&gt; folder which is found in the root of the files extracted earlier &lt;/LI&gt;
&lt;LI&gt;Complete the wizard selecting the default options. ConfigMgr/MDT will now create a new customised boot image with the location deployment wizard included. &lt;/LI&gt;
&lt;LI&gt;Assign the boot image to the OSD deployment task sequence that you wish to use the location deployment wizard with: &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/LocationBasedWizardforConfigMgr2007_6F39/Location%20Wizard%2004_2.png" mce_href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/LocationBasedWizardforConfigMgr2007_6F39/Location%20Wizard%2004_2.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="Location Wizard 04" border=0 alt="Location Wizard 04" src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/LocationBasedWizardforConfigMgr2007_6F39/Location%20Wizard%2004_thumb.png" width=583 height=523 mce_src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/LocationBasedWizardforConfigMgr2007_6F39/Location%20Wizard%2004_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;H5&gt;3. Configure location settings in the MDT Database&lt;/H5&gt;
&lt;P&gt;Locations and their associated&amp;nbsp;settings need to be configured in the MDT SQL Database, these are typically configured through the interface in the&amp;nbsp;MDT workbench. In the MDT workbench go to the &lt;B&gt;Database&amp;nbsp;&amp;gt;&amp;gt; Locations Node&lt;/B&gt;. Here you can add as many different locations as are required for your environment.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;For a location to be available to the location deployment wizard it must be assigned at least one default gateway. This can be found in a locations properties on the &lt;B&gt;Identity&lt;/B&gt; tab. &lt;/LI&gt;
&lt;LI&gt;If no default gateways for a site are initially known then assign 0.0.0.0 as the default gateway for that location. Although this site will never be automatically detected by the location build wizard, it can be manually selected. &lt;/LI&gt;
&lt;LI&gt;In the &lt;B&gt;Details &lt;/B&gt;tab of a locations properties use the &lt;B&gt;SERVERA &lt;/B&gt;property&amp;nbsp;to populate sites or country e.g. UK. This is used by the location deployment wizard to break down the locations so there is not just one long list: &lt;/LI&gt;
&lt;LI&gt;Populate any other deployment site settings as required for your deployment including locales, time zones, keyboard settings, UI Language, location specific apps and location specific admins. &lt;/LI&gt;&lt;/UL&gt;
&lt;H5&gt;4. Configure CustomSettings.ini file&lt;/H5&gt;
&lt;P&gt;The CustomSettings.ini (&lt;A href="http://technet.microsoft.com/en-us/library/bb977690.aspx" mce_href="http://technet.microsoft.com/en-us/library/bb977690.aspx"&gt;http://technet.microsoft.com/en-us/library/bb977690.aspx&lt;/A&gt;) is a rules file which is used to automate deployments and setup how to query settings from the MDT Database. The location deployment wizard has its own CustomSettings.ini which is used during Gather phases in a ConfigMgr task sequence to retrieve location settings from the MDT Database. The CustomSettings.ini file included in the supplied location deployment wizard must be customised to your environment:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Edit the CustomSettings.ini file located in the root of the extracted files. The customsettings.ini file is a rules file is used by the MDT script ZTIGather.wsf to gather all of the location based settings from an MDT database:&lt;B&gt;&lt;/B&gt; 
&lt;UL&gt;
&lt;LI&gt;All instances of &amp;lt;FQDN MDT DATABASE&amp;gt; should be replaced with the fully qualified domain name of your MDT Database server e.g. mdt01.contoso.com&lt;B&gt;&lt;/B&gt; &lt;/LI&gt;
&lt;LI&gt;All instances of &amp;lt;MDT DATABASE NAME&amp;gt; should be replaced with your MDT Database name in SQL e.g. MDTDB&lt;B&gt;&lt;/B&gt; &lt;/LI&gt;
&lt;LI&gt;All instances of &amp;lt;AUTHENTICATION SHARENAME&amp;gt; should be replaced by your shared folder name on the MDT Database server e.g. SQLShare$&lt;B&gt;&lt;/B&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;Once the customsettings.ini file has been updated it should be wrapped up into a ConfigMgr package (typically this is the MDT Settings package) and sent to all distribution points on your network which will be used for OSD. This rules package must be used by all Gather phases in your MDT integrated deployment task sequence to gather location settings from the MDT Database.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Disclaimer: The information on this site is provided "AS IS" with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the &lt;/STRONG&gt;&lt;A href="http://www.microsoft.com/info/cpyright.mspx" mce_href="http://www.microsoft.com/info/cpyright.mspx"&gt;&lt;STRONG&gt;Terms of Use&lt;/STRONG&gt;&lt;/A&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This post was contributed by &lt;/EM&gt;&lt;I&gt;&lt;STRONG&gt;Mark Hooks and Richard Smith,&lt;/STRONG&gt; c&lt;/I&gt;&lt;EM&gt;onsultants with Microsoft Services – U.K.&lt;/EM&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3274244" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/deploymentguys/attachment/3274244.ashx" length="69806" type="application/x-zip-compressed" /><category domain="http://blogs.technet.com/deploymentguys/archive/tags/ConfigMgr/default.aspx">ConfigMgr</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Configuration+Manager/default.aspx">Configuration Manager</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Scripts/default.aspx">Scripts</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Utilities/default.aspx">Utilities</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/MDT/default.aspx">MDT</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Windows+7/default.aspx">Windows 7</category></item><item><title>Keeping An Eye On USMT Progress</title><link>http://blogs.technet.com/deploymentguys/archive/2009/06/26/keeping-an-eye-on-usmt-progress.aspx</link><pubDate>Fri, 26 Jun 2009 12:31:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3258900</guid><dc:creator>Daniel Oxley</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.technet.com/deploymentguys/comments/3258900.aspx</comments><wfw:commentRss>http://blogs.technet.com/deploymentguys/commentrss.aspx?PostID=3258900</wfw:commentRss><wfw:comment>http://blogs.technet.com/deploymentguys/rsscomments.aspx?PostID=3258900</wfw:comment><description>&lt;P&gt;I recently did a project where all users had around 25Gb (don’t ask!) of data that had to be migrated with the USMT during the OS deployment.&amp;nbsp; Because of the sheer volume of data, the USMT phases of the project took an extremely long time to complete, and because no on-screen feedback is given of the progress, the customer would often think that something had hung, so they often cancelled the deployment; only to find that it was indeed running correctly.&amp;nbsp; In order to stop them doing this, I wrote a very simple VBS script that showed the current progress of the USMT.&amp;nbsp; It works by simply parsing the progress file, looking for the percentage progress of the process.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/KeepingAnEyeOnUSMTProgress_836F/tracker_2.jpg" mce_href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/KeepingAnEyeOnUSMTProgress_836F/tracker_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: block; FLOAT: none; MARGIN-LEFT: auto; BORDER-TOP: 0px; MARGIN-RIGHT: auto; BORDER-RIGHT: 0px" title=tracker border=0 alt=tracker src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/KeepingAnEyeOnUSMTProgress_836F/tracker_thumb.jpg" width=304 height=104 mce_src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/KeepingAnEyeOnUSMTProgress_836F/tracker_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;I thought I would publish it here, because when I showed it to some colleagues they asked for a copy as they thought it would be useful to use during the lab phases of MDT projects.&lt;/P&gt;
&lt;P&gt;It consists simply of a VBS file that requires the path of the USMT log file to be passed as a parameter.&amp;nbsp; The script creates a small HTML window that then displays a single line showing the progress of the USMT as a percentage.&amp;nbsp; You can either launch the script by hand or add it to the task sequence.&amp;nbsp; To add this to the task sequence, simple add the following “Run Command Line" action before the USMT capture or restore actions (or both):&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;cmd.exe /c “start /MIN cscript.exe Z:\Scripts\CUSTOM_USMT_Tracker.vbs C:\MININT\SMSOSD\OSDLOGS\USMTCapture.prg”&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;cmd.exe /c “start /MIN cscript.exe Z:\Scripts\CUSTOM_USMT_Tracker.vbs C:\MININT\SMSOSD\OSDLOGS\USMTRestore.prg”&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Why the two commands lines?&amp;nbsp; Well, the first one is to show the progress of the &lt;EM&gt;capture&lt;/EM&gt; phase of the USMT, and the second is to show the progress of the &lt;EM&gt;restore&lt;/EM&gt; phase.&amp;nbsp; Also, I should point out that the command is launched in this way because MDT needs to launch the command, and then move on.&amp;nbsp; If you don't have the cmd.exe /c "start" part at the beginning then MDT will launch the script and wait for it to finish (which is never) and the USMT commands will never fire.&amp;nbsp; You may also have noticed that I had to put the drive letter in the command path, this is because the variable %SCRIPTROOT% is not available with this usage.&lt;/P&gt;
&lt;P&gt;The screenshot below shows what it looks like in action.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/KeepingAnEyeOnUSMTProgress_836F/desktop_2.jpg" mce_href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/KeepingAnEyeOnUSMTProgress_836F/desktop_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: block; FLOAT: none; MARGIN-LEFT: auto; BORDER-TOP: 0px; MARGIN-RIGHT: auto; BORDER-RIGHT: 0px" title=desktop border=0 alt=desktop src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/KeepingAnEyeOnUSMTProgress_836F/desktop_thumb.jpg" width=644 height=484 mce_src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/KeepingAnEyeOnUSMTProgress_836F/desktop_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Be warned though, this script does consume quite a few CPU cycles because it is probably not the most efficient routine; it was really a proof-of-concept thing that I wrote in order to show that everything was running as expected.&amp;nbsp; When I wrote it I was running it on dual core desktop computers and it didn’t seem to noticeable affect the deployment time.&lt;/P&gt;
&lt;P&gt;Attached to this post is the script file.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This post was contributed by &lt;STRONG&gt;Daniel Oxley&lt;/STRONG&gt; a consultant with Microsoft Consulting Services Spain&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Disclaimer: The information on this site is provided "AS IS" with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the &lt;/STRONG&gt;&lt;A href="http://www.microsoft.com/info/cpyright.mspx" mce_href="http://www.microsoft.com/info/cpyright.mspx"&gt;&lt;STRONG&gt;Terms of Use&lt;/STRONG&gt;&lt;/A&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3258900" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/deploymentguys/attachment/3258900.ashx" length="2151" type="application/octet-stream" /><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Scripts/default.aspx">Scripts</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Utilities/default.aspx">Utilities</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/MDT/default.aspx">MDT</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/USMT/default.aspx">USMT</category></item><item><title>Sharing some simple HTAs</title><link>http://blogs.technet.com/deploymentguys/archive/2009/03/26/sharing-some-simple-htas.aspx</link><pubDate>Thu, 26 Mar 2009 16:06:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3218435</guid><dc:creator>Daniel Oxley</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/deploymentguys/comments/3218435.aspx</comments><wfw:commentRss>http://blogs.technet.com/deploymentguys/commentrss.aspx?PostID=3218435</wfw:commentRss><wfw:comment>http://blogs.technet.com/deploymentguys/rsscomments.aspx?PostID=3218435</wfw:comment><description>&lt;P&gt;I was recently asked to share these files with a colleague, so I thought I would also share them with everyone via our blog.&amp;nbsp; I developed them a while ago for a deployment project and I have since used them a few times more.&lt;/P&gt;
&lt;P&gt;Basically, they are 3 very simple HTA (HTML application) files that prompt the user for information in order to configure either a static IP address, change the local administrator password, or add a computer to a domain.&amp;nbsp; Of course, all of these actions can be accomplished directly via MDT, but I had to create them for a very specific reason where MDT could not be used to for this.&amp;nbsp; They were developed for a Windows XP deployment, so they have not been tested on Windows Vista but I can’t see why they would not work, as long as you ran them elevated.&amp;nbsp; You can be launch them directly from the task sequence in MDT by using the following command:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;mshta.exe CUSTOM_Config_Network.hta&lt;/EM&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P align=center&gt;&lt;STRONG&gt;CUSTOM_Config_Network.hta&lt;/STRONG&gt;&lt;/P&gt;
&lt;P align=center&gt;&lt;A href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/SimpleHTAs_C242/image_10.png" mce_href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/SimpleHTAs_C242/image_10.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/SimpleHTAs_C242/image_thumb_4.png" width=231 height=244 mce_src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/SimpleHTAs_C242/image_thumb_4.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P align=center&gt;&lt;STRONG&gt;CUSTOM_Config_PWD.hta&lt;/STRONG&gt;&lt;/P&gt;
&lt;P align=center&gt;&lt;A href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/SimpleHTAs_C242/image_8.png" mce_href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/SimpleHTAs_C242/image_8.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/SimpleHTAs_C242/image_thumb_3.png" width=244 height=185 mce_src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/SimpleHTAs_C242/image_thumb_3.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P align=center&gt;&lt;STRONG&gt;CUSTOM_Config_Domain.hta&lt;/STRONG&gt;&lt;/P&gt;
&lt;P align=center&gt;&lt;A href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/SimpleHTAs_C242/image_12.png" mce_href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/SimpleHTAs_C242/image_12.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/SimpleHTAs_C242/image_thumb_5.png" width=244 height=155 mce_src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/SimpleHTAs_C242/image_thumb_5.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;I have attached the 3 files to this post in a zip file.&amp;nbsp; Please bare in mind that they are pretty simple and don’t have the error checking for every possible error that might occur, so use at your own risk!&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This post was contributed by &lt;STRONG&gt;Daniel Oxley&lt;/STRONG&gt; a consultant with Microsoft Services Spain&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Disclaimer: The information on this site is provided "AS IS" with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the &lt;/STRONG&gt;&lt;A href="http://www.microsoft.com/info/cpyright.mspx" mce_href="http://www.microsoft.com/info/cpyright.mspx"&gt;&lt;STRONG&gt;Terms of Use&lt;/STRONG&gt;&lt;/A&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3218435" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/deploymentguys/attachment/3218435.ashx" length="5583" type="application/x-zip-compressed" /><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Scripts/default.aspx">Scripts</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Utilities/default.aspx">Utilities</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Tips+and+Tricks/default.aspx">Tips and Tricks</category></item><item><title>Deploying Win 7 to Boot From VHD with MDT 2010</title><link>http://blogs.technet.com/deploymentguys/archive/2009/03/03/deploying-win-7-to-boot-from-vhd-with-mdt-2010.aspx</link><pubDate>Tue, 03 Mar 2009 23:29:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3208886</guid><dc:creator>DeploymentGuys</dc:creator><slash:comments>10</slash:comments><comments>http://blogs.technet.com/deploymentguys/comments/3208886.aspx</comments><wfw:commentRss>http://blogs.technet.com/deploymentguys/commentrss.aspx?PostID=3208886</wfw:commentRss><wfw:comment>http://blogs.technet.com/deploymentguys/rsscomments.aspx?PostID=3208886</wfw:comment><description>&lt;P&gt;One of the more difficult scenarios that customers have found in the past is multi-booting a new OS. The effort needed to re-partition the drive to allow for the new OS is sometimes too great. One new solution that is gaining ground in deployment is Boot From VHD. This allows you to take a VHD file with Windows 7 or Windows Server 2008 R2 and boot your machine to it. This means that you can take advantage of the physical hardware of your machine while not having to repartition your drive for Win 7 and keep your original OS intact. More information on how to Boot From VHD can be found here &lt;A href="http://edge.technet.com/Media/Windows-7-Boot-from-VHD/" mce_href="http://edge.technet.com/Media/Windows-7-Boot-from-VHD/"&gt;http://edge.technet.com/Media/Windows-7-Boot-from-VHD/&lt;/A&gt; .&lt;/P&gt;
&lt;P&gt;MDT 2010&amp;nbsp;Beta 1 can deploy Win 7 Beta&amp;nbsp;out-of-the-box however, it deploys it to the Disk 0 Partition 1 by default. In order to change this behaviour so that MDT 2010 deploys Win 7 to a VHD and leaves your existing OS you can follow the steps below:&lt;/P&gt;
&lt;P&gt;1. Create a Task Sequence to install Win 7 in MDT 2010&lt;/P&gt;
&lt;P&gt;2. Insert the following 3 steps in the &lt;STRONG&gt;Pre-Install \ New Computer only&lt;/STRONG&gt; Phase:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;a) &lt;STRONG&gt;Disable the format and partition disk step &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/DeployingWin7toBootFromVHDwithMDT2010_B1D1/disable_2.jpg" mce_href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/DeployingWin7toBootFromVHDwithMDT2010_B1D1/disable_2.jpg"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=398 alt=disable src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/DeployingWin7toBootFromVHDwithMDT2010_B1D1/disable_thumb.jpg" width=450 border=0 mce_src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/DeployingWin7toBootFromVHDwithMDT2010_B1D1/disable_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;b) Insert a Set Task Sequence Variable Step to set the path for the VHD with the variable BootVHDLocation. Ensure that path DOES NOT EXIST already on the machine.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/DeployingWin7toBootFromVHDwithMDT2010_B1D1/BootVHD01_4.jpg" mce_href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/DeployingWin7toBootFromVHDwithMDT2010_B1D1/BootVHD01_4.jpg"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=401 alt=BootVHD01 src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/DeployingWin7toBootFromVHDwithMDT2010_B1D1/BootVHD01_thumb_1.jpg" width=449 border=0 mce_src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/DeployingWin7toBootFromVHDwithMDT2010_B1D1/BootVHD01_thumb_1.jpg"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;c) Insert a Set Task Sequence Variable Step to set the size of the VHD (in MB)&amp;nbsp;with the variable BootVHDSize. Ensure that there is enough space on the drive as the VHD may grow to this size.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/DeployingWin7toBootFromVHDwithMDT2010_B1D1/BootVHD02_2.jpg" mce_href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/DeployingWin7toBootFromVHDwithMDT2010_B1D1/BootVHD02_2.jpg"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=398 alt=BootVHD02 src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/DeployingWin7toBootFromVHDwithMDT2010_B1D1/BootVHD02_thumb.jpg" width=448 border=0 mce_src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/DeployingWin7toBootFromVHDwithMDT2010_B1D1/BootVHD02_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;d) Insert a Run Command Line step to run the command line cscript.exe "%SCRIPTROOT%\ZTIDiskPartVHD.wsf"&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;A href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/DeployingWin7toBootFromVHDwithMDT2010_B1D1/BootVHD03_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=427 alt=BootVHD03 src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/DeployingWin7toBootFromVHDwithMDT2010_B1D1/BootVHD03_thumb.jpg" width=481 border=0&gt;&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;3.&amp;nbsp; Copy the attached script below to your Distribution$\Scripts folder.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;4.&amp;nbsp; Run your task sequence on a machine and watch Win 7 install into a VHD. Once the process is done, your machine will have a boot menu similar to this:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/DeployingWin7toBootFromVHDwithMDT2010_B1D1/BootMenu_2.jpg" mce_href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/DeployingWin7toBootFromVHDwithMDT2010_B1D1/BootMenu_2.jpg"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=312 alt=BootMenu src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/DeployingWin7toBootFromVHDwithMDT2010_B1D1/BootMenu_thumb.jpg" width=370 border=0 mce_src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/DeployingWin7toBootFromVHDwithMDT2010_B1D1/BootMenu_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Please note, this script does not deal with BitLocker encrypted drives and Boot From VHD will only work with Windows 7 Beta or Windows Server 2008 R2. As always test this out and feel free to post comments. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Disclaimer: The information on this site is provided "AS IS" with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the &lt;/STRONG&gt;&lt;A href="http://www.microsoft.com/info/cpyright.mspx" mce_href="http://www.microsoft.com/info/cpyright.mspx"&gt;&lt;STRONG&gt;Terms of Use&lt;/STRONG&gt;&lt;/A&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This post was contributed by &lt;STRONG&gt;Aly Shivji&lt;/STRONG&gt; a consultant with Microsoft Services - U.S. East Region.&lt;/EM&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3208886" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/deploymentguys/attachment/3208886.ashx" length="3312" type="application/x-zip-compressed" /><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Scripts/default.aspx">Scripts</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Deployment/default.aspx">Deployment</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Windows+7/default.aspx">Windows 7</category></item><item><title>"Easy" List Items for the Microsoft Deployment Toolkit</title><link>http://blogs.technet.com/deploymentguys/archive/2008/12/12/easy-list-items-for-the-microsoft-deployment-toolkit.aspx</link><pubDate>Fri, 12 Dec 2008 13:00:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3164511</guid><dc:creator>DeploymentGuys</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/deploymentguys/comments/3164511.aspx</comments><wfw:commentRss>http://blogs.technet.com/deploymentguys/commentrss.aspx?PostID=3164511</wfw:commentRss><wfw:comment>http://blogs.technet.com/deploymentguys/rsscomments.aspx?PostID=3164511</wfw:comment><description>&lt;P&gt;In MDT rules processing with CustomSettings.ini, some of the items that can be configured are List Items.&amp;nbsp; List Items are essentially multi-valued custom properties.&amp;nbsp; Examples of items that are List Items are Applications in LTI and Packages in ZTI.&amp;nbsp; To define a List Item based property in CustomSettings.ini you add the base property name in the Properties line in the Settings section in the form Propertyname(*) if it is a custom List Item.&amp;nbsp; Then in the section(s) where you want the to define the values for the List Item, you add them in the form of either Propertyname1=value or Propertyname001=value.&amp;nbsp; The numeric suffix should start at 1 or 001 and increment by 1.&amp;nbsp; Below is the example for the Packages List Item property from the MDT help file:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;[Settings] &lt;BR&gt;Priority=Default &lt;/P&gt;
&lt;P&gt;[Default] &lt;BR&gt;Packages001=NYC00010:Install &lt;BR&gt;Packages002=NYC00011:Install&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Since this is an MDT-defined property, it does not need to be listed in the Properties line.&amp;nbsp; Below is an example of a custom List Item (additions in blue):&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;[Settings] &lt;BR&gt;Priority=&lt;FONT color=#0000ff&gt;ExcludeRootFolders&lt;/FONT&gt;, Default &lt;BR&gt;Properties=MyCustomProperty, &lt;FONT color=#0000ff&gt;UsmtExcludeRootFolders(*)&lt;/FONT&gt; &lt;/P&gt;
&lt;P&gt;[Default] &lt;BR&gt;OSInstall=Y &lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;[ExcludeRootFolders] &lt;BR&gt;UsmtExcludeRootFolders001=%ProfilesFolder% &lt;BR&gt;UsmtExcludeRootFolders002=%ProgramData% &lt;BR&gt;UsmtExcludeRootFolders003=%ProgramFiles% &lt;BR&gt;UsmtExcludeRootFolders004=%windir% &lt;BR&gt;UsmtExcludeRootFolders005=C:\_SMSTaskSequence &lt;BR&gt;UsmtExcludeRootFolders006=C:\drivers &lt;BR&gt;UsmtExcludeRootFolders007=C:\MININT &lt;BR&gt;UsmtExcludeRootFolders008=C:\MSOCache &lt;BR&gt;UsmtExcludeRootFolders009=C:\Temp &lt;BR&gt;UsmtExcludeRootFolders010=C:\Winnt &lt;BR&gt;UsmtExcludeRootFolders011=C:\Boot &lt;BR&gt;UsmtExcludeRootFolders012=C:\System Volume Information &lt;BR&gt;UsmtExcludeRootFolders013=C:\PerfLogs&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The list of folders in this example is one of several lists that a custom script of mine consumes and generates a custom USMT XML file.&amp;nbsp; When I was first doing this with standard MDT List Items I found several things really frustrating.&amp;nbsp; The first was the numeric suffix.&amp;nbsp; The numeric suffix must be in numeric order and there must be no repeated numbers and no gaps in the number sequences.&amp;nbsp; If you don't do this, not all the items will be processed.&amp;nbsp; I like to keep the folders in alphabetical order so that when I need to add or remove one, it is easy to find the place to add, delete, and make sure I'm not adding a duplicate.&amp;nbsp; So when I have to add an item near the top of the list, painful tedious re-numbering would have to be done.&lt;/P&gt;
&lt;P&gt;Also, MDT rules processing expands all variables in values placed on CustomSettings.ini.&amp;nbsp; So the special folder variables at the beginning of the list would get expanded to the value for that folder on the source OS.&amp;nbsp; However, I actually wanted the exact text (without variables being expanded) placed in the List Item.&lt;/P&gt;
&lt;P&gt;So to get around these limitations I created a User Exit script to implement what I call Easy List Items.&amp;nbsp; Here is the previous example done as an Easy List Item (additions in green):&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;[Settings] &lt;BR&gt;Priority=&lt;FONT color=#008000&gt;TestEasyListItem&lt;/FONT&gt;, Default &lt;BR&gt;Properties=MyCustomProperty, &lt;FONT color=#008000&gt;AddUsmtExcludeRootFolders&lt;/FONT&gt;&lt;/P&gt;[Default] &lt;BR&gt;OSInstall=Y 
&lt;P&gt;&lt;FONT color=#008000&gt;[TestEasyListItem] &lt;BR&gt;UserExit=EasyListItemExit.vbs &lt;BR&gt;&lt;FONT color=#008000&gt;AddUsmtExcludeRootFolders&lt;/FONT&gt;=#AddToListItem("UsmtExcludeRootFolders", "ExcludeRootFolders", "", False)#&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#008000&gt;[ExcludeRootFolders] &lt;BR&gt;UsmtExcludeRootFolders=%ProfilesFolder% &lt;BR&gt;UsmtExcludeRootFolders=%ProgramData% &lt;BR&gt;UsmtExcludeRootFolders=%ProgramFiles% &lt;BR&gt;UsmtExcludeRootFolders=%windir% &lt;BR&gt;UsmtExcludeRootFolders=C:\_SMSTaskSequence &lt;BR&gt;UsmtExcludeRootFolders=C:\Boot &lt;BR&gt;UsmtExcludeRootFolders=C:\drivers &lt;BR&gt;UsmtExcludeRootFolders=C:\MININT &lt;BR&gt;UsmtExcludeRootFolders=C:\MSOCache &lt;BR&gt;UsmtExcludeRootFolders=C:\PerfLogs &lt;BR&gt;UsmtExcludeRootFolders=C:\Temp &lt;BR&gt;UsmtExcludeRootFolders=C:\System Volume Information &lt;BR&gt;UsmtExcludeRootFolders=C:\Winnt&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;As you can see from this example, the AddToListItem function in EasyListItemExit.vbs allows you to add all the List Item entries without the numeric suffix.&amp;nbsp; You can now reorder, add, and delete items without worrying about number order or gaps in the numbering.&amp;nbsp; And because this function simply adds to the List Item if it already exists, Easy List Items can coexist with standard MDT List Item entries.&lt;/P&gt;
&lt;P&gt;The parameters for the function are the List Item name, the section to process for entries to add, the INI file path (blank for the current INI file), and True (expand variables) or False (don't expand variables).&amp;nbsp; The INI file parameter allows you to query additional INI files for entries.&amp;nbsp; In this example the custom property AddUsmtExcludeRootFolders that causes the AddToListItem function to run will have a value of Success or Failure (if the List Item entries, section name, or INI file cannot be found).&lt;/P&gt;
&lt;P&gt;The script can be found in the Zip file below.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Disclaimer: The information on this site is provided "AS IS" with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the &lt;/STRONG&gt;&lt;A href="http://www.microsoft.com/info/cpyright.mspx" mce_href="http://www.microsoft.com/info/cpyright.mspx"&gt;&lt;STRONG&gt;Terms of Use&lt;/STRONG&gt;&lt;/A&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This post was contributed by &lt;B&gt;Michael Murgolo,&lt;/B&gt; a Senior Consultant with Microsoft Services - U.S. East Region.&lt;/EM&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3164511" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/deploymentguys/attachment/3164511.ashx" length="2418" type="application/x-zip-compressed" /><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Microsoft+Deployment/default.aspx">Microsoft Deployment</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Scripts/default.aspx">Scripts</category></item><item><title>Porting Configuration Manager Task Sequences to a Different Environment</title><link>http://blogs.technet.com/deploymentguys/archive/2008/10/15/porting-configuration-manager-task-sequences-to-a-different-environment.aspx</link><pubDate>Wed, 15 Oct 2008 23:27:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3136932</guid><dc:creator>DeploymentGuys</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/deploymentguys/comments/3136932.aspx</comments><wfw:commentRss>http://blogs.technet.com/deploymentguys/commentrss.aspx?PostID=3136932</wfw:commentRss><wfw:comment>http://blogs.technet.com/deploymentguys/rsscomments.aspx?PostID=3136932</wfw:comment><description>&lt;P&gt;Many scenarios arise in which you may want to port your task sequence from one environment to another. Common scenarios include promotion through Lab and QA environments and migration between disconnected hierarchies.&amp;nbsp; Configuration Manager allows you to export task sequences into XML files as an out-of-the-box feature,&amp;nbsp;however there are some things to remember when doing this. &lt;/P&gt;
&lt;P&gt;Here is a checklist I like to follow:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;1. &lt;STRONG&gt;Passwords: &lt;/STRONG&gt;The exported task sequence will replace passwords in the task sequence for known steps before performing an export to ensure no clear-text passwords exist in the XML. This means any passwords in the "Apply Windows Settings" and "Join Domain" steps will replaced with &lt;STRONG&gt;????????&amp;nbsp; &lt;/STRONG&gt;. Remember to re-enter passwords when importing the task sequence or it will be set to 8 consecutive question marks.&lt;/P&gt;
&lt;P&gt;2. &lt;STRONG&gt;Product Keys:&lt;/STRONG&gt; Any product keys you enter will be blanked out in the "Apply Windows Settings" step. Remember to re-enter these for your XP task sequences.&lt;/P&gt;
&lt;P&gt;3. &lt;STRONG&gt;Package IDs*:&lt;/STRONG&gt; If the new Configuration Manager Site Server is not in the same hierarchy, you will have to re-associate all the steps in the task sequence to the packages in the new environment. You may also need to reassociate the boot image and any packages selected to run before the task sequence. &lt;STRONG&gt;Read below for a script to automate this process.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;4. &lt;STRONG&gt;Inject Drivers in the Apply Driver Package step&lt;/STRONG&gt;: If you have configured the task sequence with an Apply Driver Package step and chosen a boot-critical driver for Pre-Vista OSes, you will need to reselect this driver in the new environment.&lt;/P&gt;
&lt;P&gt;5. &lt;STRONG&gt;Setup Windows and Config Manager step:&lt;/STRONG&gt; If you are migrating to a new hierarchy, you will also want to see whether any of your Config Manager client properties need to be changed - such as reference to an FSP or SLP.&lt;/P&gt;
&lt;P&gt;6. &lt;STRONG&gt;Domain references: &lt;/STRONG&gt;You may have to also change any Join Domain steps you have in the Task Sequence to point to a new domain and use different credentials to perform the join.&lt;/P&gt;
&lt;P&gt;7. &lt;STRONG&gt;MDT Database: &lt;/STRONG&gt;If you are moving to a new hierarchy, the packageIDs&amp;nbsp;&amp;nbsp;in your MDT Database will still point to packageIDs in your previous environment. I am working on a script to help automate this and will post it once it is ready.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;*Steps 3 can be a tedious process and often times can result in a manual configuration error. Luckily, we've created some &lt;STRONG&gt;powershell&lt;/STRONG&gt;&amp;nbsp;scripts to help make the process less manual:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Automated Scripts:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;ExportTSRefs.ps1 - &lt;/STRONG&gt;Exports the name, packageID and version of any referenced packages of a given task sequence to a RefIDsFile. This includes OS Packages, OS Install Packages, Driver Packages, Boot Image Packages and&amp;nbsp;Software Packages. &lt;STRONG&gt;Note this only exports the refIDsFile not the packages or XML themselves.&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;Usage: &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;."ExportTSRefs.ps1" -sitecode &amp;lt;sitecode&amp;gt; -refIDsFile &amp;lt;filename&amp;gt; -delim &amp;lt;delimiter&amp;gt; -tsID &amp;lt;taskSequencePackageID&amp;gt; 
&lt;P&gt;&lt;STRONG&gt;For Example to Export the references of the CEN00001 TaskSequence Package:&lt;/STRONG&gt; 
&lt;P&gt;."ExportTSRefs.ps1" -sitecode "CEN" -refIDsFile "refIDs.txt" -delim "=" -tsID "CEN00001" 
&lt;P&gt;&lt;STRONG&gt;Running the script multiple times with different tsIDs and&amp;nbsp;an existing refIDs file&amp;nbsp;will append only unique packageIDs to the refIDs File.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;ScrubTS.ps1&lt;/STRONG&gt; - Reads a RefIDsfile generated by the ExportTSRefs.ps1 script. It then scrubs&amp;nbsp;all the&amp;nbsp;Task Sequence XML files in&amp;nbsp;the given&amp;nbsp;folder&amp;nbsp;for package IDs, looks up packages with the same name and version in the new environment and replaces the XML with the new package IDs.&lt;STRONG&gt; Note: packages in&amp;nbsp;Configuration Manager&amp;nbsp;and source files&amp;nbsp;must already exist in the new environment.&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;Usage:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;."ScrubTS.ps1" -sitecode &amp;lt;sitecode&amp;gt; -refIDsFile &amp;lt;filename&amp;gt; -delim &amp;lt;delimiter&amp;gt; -path &amp;lt;folderpath&amp;gt; 
&lt;P&gt;&lt;STRONG&gt;For Example to scrub the package IDs of all the XML files in the C:\ExportedTaskSequences folder&lt;/STRONG&gt; 
&lt;P&gt;."ScrubTS.ps1" -sitecode "CEN" -refIDsFile "refIDs.txt" -delim "=" -path "C:\ExportedTaskSequences"&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Remember the path is a folder name and the script will read&amp;nbsp;all the&amp;nbsp;.XML files in the folder. The new XML files will have the extension &lt;STRONG&gt;_scrubbed.XML&lt;/STRONG&gt;.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;For both scripts you can use any delimiter you like , I prefer "=" but feel free to experiment.&lt;/STRONG&gt; 
&lt;P&gt;We are working on developing more scripts to add further automation around the promotion and migration process of task sequences. Stay tuned! As always try out the scripts and feel free to add any comments or contributions. 
&lt;P&gt;&lt;EM&gt;This post was contributed by &lt;/EM&gt;&lt;STRONG&gt;&lt;I&gt;Aly Shivji&lt;/I&gt;&lt;/STRONG&gt;&lt;EM&gt; a consultant with Microsoft Services - U.S. East Region. &lt;/EM&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3136932" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/deploymentguys/attachment/3136932.ashx" length="1661" type="application/x-zip-compressed" /><category domain="http://blogs.technet.com/deploymentguys/archive/tags/ConfigMgr/default.aspx">ConfigMgr</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Configuration+Manager/default.aspx">Configuration Manager</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Scripts/default.aspx">Scripts</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Tips+and+Tricks/default.aspx">Tips and Tricks</category></item><item><title>Logging All the Configuration Manager Task Sequence Variables</title><link>http://blogs.technet.com/deploymentguys/archive/2008/08/29/outputting-all-the-configuration-manager-task-sequence-variables.aspx</link><pubDate>Fri, 29 Aug 2008 18:31:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3113960</guid><dc:creator>DeploymentGuys</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.technet.com/deploymentguys/comments/3113960.aspx</comments><wfw:commentRss>http://blogs.technet.com/deploymentguys/commentrss.aspx?PostID=3113960</wfw:commentRss><wfw:comment>http://blogs.technet.com/deploymentguys/rsscomments.aspx?PostID=3113960</wfw:comment><description>&lt;P&gt;When debugging a MDT based Configuration Manager Task Sequence, it is often helpful to know what certain built-in Configuration Manager variables are set to during a step in the task sequence. For instance, you may want to see if &lt;STRONG&gt;_SMSTSLastActionRetCode &lt;/STRONG&gt;was equal to a certain value or perhaps which management point the client is using by checking &lt;B&gt;_SMSTSMP&lt;/B&gt;. These variables and more are available in the &lt;STRONG&gt;Microsoft.SMS.TSEnvironment&lt;/STRONG&gt; and you can easily log them using the script snippet below:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Dim sVar&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Set osdV4 = CreateObject("Microsoft.SMS.TSEnvironment")&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;For Each sVar in osdv4.GetVariables() &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oLogging.CreateEntry sVar &amp;amp; ":" &amp;amp; oEnvironment.Item(sVar), LogTypeInfo &lt;BR&gt;Next&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;A list of the variables and their values can be found at &lt;A title=http://technet.microsoft.com/en-us/library/bb632442.aspx href="http://technet.microsoft.com/en-us/library/bb632442.aspx" mce_href="http://technet.microsoft.com/en-us/library/bb632442.aspx"&gt;http://technet.microsoft.com/en-us/library/bb632442.aspx&lt;/A&gt; .&lt;/P&gt;
&lt;P&gt;The full ZTI-style script is included below. Add the script to the Microsoft Deployment Toolkit package and you can call this script as a task in the task sequence. The variables will be outputted to &lt;STRONG&gt;OutputTSVariables.log&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;Try it out and feel free to comment.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This post was contributed by &lt;/EM&gt;&lt;STRONG&gt;&lt;I&gt;Aly Shivji&lt;/I&gt;&lt;/STRONG&gt;&lt;EM&gt; a consultant with Microsoft Services - U.S. East Region.&lt;/EM&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3113960" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/deploymentguys/attachment/3113960.ashx" length="1002" type="application/x-zip-compressed" /><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Configuration+Manager/default.aspx">Configuration Manager</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Scripts/default.aspx">Scripts</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Utilities/default.aspx">Utilities</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Tips+and+Tricks/default.aspx">Tips and Tricks</category></item><item><title>MDT Script Explanations</title><link>http://blogs.technet.com/deploymentguys/archive/2008/07/09/mdt-script-explanations.aspx</link><pubDate>Wed, 09 Jul 2008 12:41:56 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3086070</guid><dc:creator>DeploymentGuys</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/deploymentguys/comments/3086070.aspx</comments><wfw:commentRss>http://blogs.technet.com/deploymentguys/commentrss.aspx?PostID=3086070</wfw:commentRss><wfw:comment>http://blogs.technet.com/deploymentguys/rsscomments.aspx?PostID=3086070</wfw:comment><description>&lt;p&gt;I get quite a few emails from people asking if there is a help file that details all of the scripts that are supplied with Microsoft Deployment Toolkit (MDT). The scripts form the engine of a deployment and can also help you to develop a framework for scripts that you need to create for your own tasks. The MDT documentation (installed in \Program Files\Microsoft Deployment Toolkit\Documentation) is a good place to start - but I also point people to the online MDT Reference - which lists the following information for each script supplied:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;p&gt;&lt;b&gt;Name.&lt;/b&gt; Specifies the name of the script.&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;p&gt;&lt;b&gt;Description.&lt;/b&gt; Provides a description of the purpose of the script and any pertinent information regarding script customisation.&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;p&gt;&lt;b&gt;Input.&lt;/b&gt; Indicates the files used for input to the script.&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;p&gt;&lt;b&gt;Output.&lt;/b&gt; Indicates the files created or modified by the script.&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;p&gt;&lt;b&gt;References.&lt;/b&gt; Indicates other scripts or configuration files that are referenced by the script.&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;p&gt;&lt;b&gt;Location.&lt;/b&gt; Indicates the folder where the script can be found. In the information for the location, the following variables are used:&lt;/p&gt;      &lt;ul&gt;       &lt;li&gt;         &lt;p&gt;&lt;b&gt;program_files.&lt;/b&gt; This variable points to the location of the Program Files folder on the computer where Microsoft Deployment is installed. &lt;/p&gt;       &lt;/li&gt;        &lt;li&gt;         &lt;p&gt;&lt;b&gt;distribution.&lt;/b&gt; This variable points to the location of the Distribution folder for the deployment point.&lt;/p&gt;       &lt;/li&gt;        &lt;li&gt;         &lt;p&gt;&lt;b&gt;platform.&lt;/b&gt; This variable is a placeholder for the operating system platform (x86 or x64).&lt;/p&gt;       &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;p&gt;&lt;b&gt;Use.&lt;/b&gt; Provides the command line and options that can be specified.&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;p&gt;&lt;b&gt;Arguments and description.&lt;/b&gt; Indicate the valid arguments to be specified for the script and a brief description of what each argument means.&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;p&gt;&lt;b&gt;Properties.&lt;/b&gt; The properties referenced by the script.&lt;/p&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;You will find each MDT script breakdown at &lt;a title="http://technet.microsoft.com/en-us/library/bb979605(TechNet.10).aspx" href="http://technet.microsoft.com/en-us/library/bb979605(TechNet.10).aspx"&gt;http://technet.microsoft.com/en-us/library/bb979605(TechNet.10).aspx&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This post was contributed by &lt;b&gt;Richard Smith&lt;/b&gt; a Senior Consultant with Microsoft Services, UK.&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3086070" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Microsoft+Deployment/default.aspx">Microsoft Deployment</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Scripts/default.aspx">Scripts</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Tips+and+Tricks/default.aspx">Tips and Tricks</category></item><item><title>Useful Script Number 6 - Pausing the Task Sequence</title><link>http://blogs.technet.com/deploymentguys/archive/2008/07/07/useful-script-number-6-pausing-the-task-sequence.aspx</link><pubDate>Mon, 07 Jul 2008 19:59:18 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3084983</guid><dc:creator>DeploymentGuys</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.technet.com/deploymentguys/comments/3084983.aspx</comments><wfw:commentRss>http://blogs.technet.com/deploymentguys/commentrss.aspx?PostID=3084983</wfw:commentRss><wfw:comment>http://blogs.technet.com/deploymentguys/rsscomments.aspx?PostID=3084983</wfw:comment><description>&lt;p&gt;Have you ever wanted to pause the task sequence in MDT 2008 or ConfigMgr 2007 for a few seconds while something catches up...? I had a requirement to do this recently where I ran a &lt;a href="http://blogs.technet.com/deploymentguys/archive/2008/04/18/useful-script-number-3-turning-the-windows-vista-sidebar-on-and-off.aspx"&gt;task to close and cancel the Windows Sidebar&lt;/a&gt; at the start of the State Restore phase of the task sequencer and then turn the Windows Sidebar back on again at the end of the State Restore phase - I was doing this as the Windows Sidebar can sometimes get in the way of some customisation scripts and you can also see peculiar VB messages when 2007 Office System updates are applied. When the Windows Sidebar is turned back on, there is a couple of seconds before the Sidebar actually appears - yet my task for turning on the Sidebar had returned and the task sequence had moved on...it made be think that there may be other situations where a slight delay in returning to the task sequence may be useful - sure you could add sleep commands to the scripts that your running as commands - but that doesn't help with the tasks that are not scripted - so here is an MDT based script that will pause the task sequence for a specified number of seconds (specified on the command line)&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;I first have a couple of variables to store the time to pause (strTime) and the script name (strSName - for logging purposes) and the integer argument for the sleep method&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;Dim strTime, strSName, IntTime&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier"&gt;&lt;font face="Courier New"&gt;ZTIProcess=1&lt;/font&gt; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;...I then use a call to ZTIUtility.wsf to set the script name to the strSName variable - this is then used to insert the script name at the start of each line in the log.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier"&gt;&lt;font face="Courier New"&gt;strSName=oUtility.ScriptName&lt;/font&gt; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;...then it's another call to ZTIUtility.wsf to use the arguments class - this makes passing input to the script via the command line easy - in this case I am setting a command line input called &amp;quot;Time&amp;quot; &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;strTime = oUtility.Arguments(&amp;quot;Time&amp;quot;) &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier"&gt;&lt;font face="Courier New"&gt;oLogging.CreateEntry strSName &amp;amp; &amp;quot;: Starting Actions ********************************************* &amp;quot;,LogTypeInfo&lt;/font&gt; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;...then I check that Time has been specified as a command line input (exit if not) or set the IntTime to number of seconds from the command line x 1000 to get milliseconds&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;If strTime=&amp;quot;&amp;quot; Then      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; oLogging.CreateEntry strSName &amp;amp; &amp;quot;: No pause time was specified on the command line.&amp;quot;,LogTypeError       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ZTIProcess=90       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Exit Function       &lt;br /&gt;Else       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; oLogging.CreateEntry strSName &amp;amp; &amp;quot;: Pause time has been set to &amp;quot; &amp;amp; strTime &amp;amp; &amp;quot; seconds&amp;quot;,LogTypeInfo&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier"&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; IntTime = strTime * 1000&amp;#160; &lt;br /&gt;End if&lt;/font&gt; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;...I then take the intTime (in milliseconds) and add it to the sleep method to pause the script&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;oLogging.CreateEntry strSName &amp;amp; &amp;quot;: Task Sequence will pause for &amp;quot; &amp;amp; int(IntTime/1000) &amp;amp; &amp;quot; seconds&amp;quot;,LogTypeInfo &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;wscript.sleep intTime &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;oLogging.CreateEntry strSName &amp;amp; &amp;quot;: Task Sequence has been paused for &amp;quot; &amp;amp; int(IntTime/1000) &amp;amp; &amp;quot; seconds - returning control to the Task Sequence now&amp;quot;,LogTypeInfo &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier"&gt;&lt;font face="Courier New"&gt;oLogging.CreateEntry strSName &amp;amp; &amp;quot;: Completed Actions ********************************************* &amp;quot;,LogTypeInfo        &lt;br /&gt;ZTIProcess = 0         &lt;br /&gt;End Function&lt;/font&gt; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;The script is called &lt;strong&gt;CFG-TSPause.wsf&lt;/strong&gt; so the command line to run it would be &lt;strong&gt;CFG-TSPause.wsf /Time:xx&lt;/strong&gt; (where xx = the number of seconds that you want to pause the task sequence for) Drop the script into your &lt;strong&gt;&amp;lt;Deployment Share&amp;gt;\Scripts&lt;/strong&gt; directory. You can then add the script anywhere in your task sequence by adding a &lt;strong&gt;Run Command Line task&lt;/strong&gt; and specifying the script and the command line input for the number of seconds you want to pause.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/UsefulScriptNumber6PausingtheTaskSequenc_FCEF/image_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="519" alt="image" src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/UsefulScriptNumber6PausingtheTaskSequenc_FCEF/image_thumb.png" width="572" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;As usual, the full script is up on the Deployment Guys SkyDrive:&lt;/p&gt;  &lt;p&gt;&lt;/p&gt; &lt;iframe style="border-right: #dde5e9 1px solid; padding-right: 0px; border-top: #dde5e9 1px solid; padding-left: 0px; padding-bottom: 0px; margin: 3px; border-left: #dde5e9 1px solid; width: 240px; padding-top: 0px; border-bottom: #dde5e9 1px solid; height: 66px; background-color: #ffffff" marginwidth="0" marginheight="0" src="http://cid-7be6feba9e7c999c.skydrive.live.com/embedrowdetail.aspx/DeploymentGuys/CFG-TSPause.zip" frameborder="0" scrolling="no"&gt;&lt;/iframe&gt;  &lt;p&gt;This post was contributed by &lt;b&gt;Richard Smith&lt;/b&gt; a Senior Consultant with Microsoft Services, UK.&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3084983" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/deploymentguys/archive/tags/BDD+2007/default.aspx">BDD 2007</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Microsoft+Deployment/default.aspx">Microsoft Deployment</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/SCCM+2007/default.aspx">SCCM 2007</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/ConfigMgr/default.aspx">ConfigMgr</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Scripts/default.aspx">Scripts</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Deployment/default.aspx">Deployment</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Tips+and+Tricks/default.aspx">Tips and Tricks</category></item><item><title>Useful Script Number 5 - Adjusting the Default User Registry Hive</title><link>http://blogs.technet.com/deploymentguys/archive/2008/06/06/useful-script-number-5-adjusting-the-default-user-registry-hive.aspx</link><pubDate>Fri, 06 Jun 2008 17:03:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3067042</guid><dc:creator>DeploymentGuys</dc:creator><slash:comments>7</slash:comments><comments>http://blogs.technet.com/deploymentguys/comments/3067042.aspx</comments><wfw:commentRss>http://blogs.technet.com/deploymentguys/commentrss.aspx?PostID=3067042</wfw:commentRss><wfw:comment>http://blogs.technet.com/deploymentguys/rsscomments.aspx?PostID=3067042</wfw:comment><description>&lt;p&gt;&lt;font size="1"&gt;&lt;b&gt;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1"&gt;&lt;b&gt;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;b&gt;Michael Murgolo &lt;/b&gt;did a great post on the different ways to adjust default settings when building an image (&lt;/font&gt;&lt;a href="http://blogs.technet.com/deploymentguys/archive/2008/02/18/configuring-default-user-and-computer-settings-for-windows-image-deployment.aspx"&gt;&lt;font size="2"&gt;Configuring default settings for Windows image deployment&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt;) and one of the options presented was to targeted changes to the Default User Registry hive and profile folders. I had to do this recently and put together a script that can be launched from the MDT task sequence because I was finding my customised Administrator profile wasn't being copied over correctly to the Default User profile as part of SysPrep. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;As Michael mentioned in his post - there are three main processes...you first need to load the default user hive (NTUser.dat) - make the changes you require - then unload the user hive. I have reproduced the core part of my script that does this process for discussion.&lt;/font&gt;&lt;/p&gt; &lt;strong&gt;&lt;/strong&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;strong&gt;The first section sets the two variables that will be used - one to store the temp key&lt;/strong&gt; &lt;font face="cour"&gt;(&lt;/font&gt;&lt;font face="Courier"&gt;sTempHive&lt;/font&gt;&lt;font face="cour"&gt;)&lt;/font&gt;&lt;strong&gt; that we will load to, and the second to hold the profile file and location that we want to load&lt;/strong&gt; (&lt;font face="Courier"&gt;sDefaultUserHive&lt;/font&gt;)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;strong&gt;For Windows Vista the entry&lt;/strong&gt; &lt;font face="Courier"&gt;&amp;quot;&amp;quot;&amp;quot;%USERPROFILE%\..\Default\NTUSER.DAT&amp;quot;&amp;quot;&amp;quot;&lt;/font&gt;&lt;strong&gt; refers to C:\Users\Default\ntuser.dat&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier" size="1"&gt;sTempHive = &amp;quot;&amp;quot;&amp;quot;HKEY_USERS\Test&amp;quot;&amp;quot;&amp;quot;      &lt;br /&gt;sDefaultUserHive = &amp;quot;&amp;quot;&amp;quot;%USERPROFILE%\..\Default\NTUSER.DAT&amp;quot;&amp;quot;&amp;quot;       &lt;br /&gt;sSName = oUtility.ScriptName       &lt;br /&gt;set oshell = WScript.CreateObject (&amp;quot;Wscript.Shell&amp;quot;) &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier" size="1"&gt;iZTIRetValue=&amp;quot;1&amp;quot; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="2"&gt;We then need to start logging - it's the law :-)&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier" size="1"&gt;oLogging.CreateEntry sSName &amp;amp; &amp;quot;: Actions Start - Updating Default Profile&amp;quot;,LogTypeInfo      &lt;br /&gt;oLogging.CreateEntry sSName &amp;amp; &amp;quot;: Loading the Default User hive&amp;quot;,LogTypeInfo &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="2"&gt;The next section runs reg load to load the NTUser.dat file from the default user directory to the temp key (HKEY_USERS\Test) set in the first section - if there is an error the script fails and quits with a specific failure number or we log success.&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier" size="1"&gt;oShell.run &amp;quot;reg load &amp;quot; &amp;amp; sTempHive &amp;amp; &amp;quot; &amp;quot; &amp;amp; sDefaultUserHive      &lt;br /&gt;If Err&amp;lt;&amp;gt;0 Then       &lt;br /&gt;&amp;#160; oLogging.CreateEntry sSName &amp;amp; &amp;quot;: Failed to load the registry hive &amp;quot; &amp;amp; sDefaultUserHive,LogTypeError       &lt;br /&gt;&amp;#160; ZTIProcess=70       &lt;br /&gt;&amp;#160; Exit Function       &lt;br /&gt;End If       &lt;br /&gt;oLogging.CreateEntry sSName &amp;amp; &amp;quot;: Default User Hive Loaded to &amp;quot; &amp;amp; sTempHive,LogTypeInfo       &lt;br /&gt;oLogging.CreateEntry sSName &amp;amp; &amp;quot;: Starting Registry Changes... &amp;quot;,LogTypeInfo &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="1"&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="2"&gt;Now that the hive is loaded we can start changing stuff...as an example - I have set the code to change the wallpaper and the screen saver for the default user - again with error checking and specific failure codes&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;strong&gt;This codes sets the wallpaper (the file needs to be where you set the key to :-)&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier" size="1"&gt;oLogging.CreateEntry sSName &amp;amp; &amp;quot;: Setting Default User Wallpaper&amp;quot;,LogTypeInfo      &lt;br /&gt;RegPath = &amp;quot;HKEY_USERS\Test\Control Panel\Desktop\&amp;quot;       &lt;br /&gt;oshell.RegWrite Regpath &amp;amp; &amp;quot;WallPaper&amp;quot;, &amp;quot;C:\Windows\Web\Wallpaper\CorporateWallpaper.bmp&amp;quot;, &amp;quot;REG_SZ&amp;quot;       &lt;br /&gt;If Err&amp;lt;&amp;gt;0 Then       &lt;br /&gt;&amp;#160; oLogging.CreateEntry sSName &amp;amp; &amp;quot;: Failed to update wallpaper file setting&amp;quot;,LogTypeError       &lt;br /&gt;&amp;#160; ZTIProcess=60       &lt;br /&gt;&amp;#160; Exit Function       &lt;br /&gt;End If &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="2"&gt;...and this codes sets the screen saver (again - the file needs to be where you set the key to :-)&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier" size="1"&gt;oLogging.CreateEntry sSName &amp;amp; &amp;quot;: Setting Default User Screensaver&amp;quot;,LogTypeInfo      &lt;br /&gt;RegPath = &amp;quot;HKEY_USERS\Test\Control Panel\Desktop\&amp;quot;       &lt;br /&gt;oshell.RegWrite Regpath &amp;amp; &amp;quot;SCRNSAVE.EXE&amp;quot;, &amp;quot;C:\Windows\CorporateScreensaver.scr&amp;quot;, &amp;quot;REG_SZ&amp;quot;       &lt;br /&gt;If Err&amp;lt;&amp;gt;0 Then       &lt;br /&gt;&amp;#160; oLogging.CreateEntry sSName &amp;amp; &amp;quot;: Failed to update Screensaver settings&amp;quot;,LogTypeError       &lt;br /&gt;&amp;#160; ZTIProcess=50       &lt;br /&gt;&amp;#160; Exit Function       &lt;br /&gt;End If &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="2"&gt;Once all of the changes have been made - its time to unload the hive from its temp key - again with logging and error checking&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier" size="1"&gt;oLogging.CreateEntry sSName &amp;amp; &amp;quot;: Unloading the Default User hive&amp;quot;,LogTypeInfo &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier" size="1"&gt;oShell.run &amp;quot;reg unload &amp;quot; &amp;amp; sTempHive      &lt;br /&gt;If Err&amp;lt;&amp;gt;0 Then       &lt;br /&gt;&amp;#160; oLogging.CreateEntry sSName &amp;amp; &amp;quot;: Failed to unload the default user registry hive&amp;quot;,LogTypeError       &lt;br /&gt;&amp;#160; ZTIProcess=40       &lt;br /&gt;&amp;#160; Exit Function       &lt;br /&gt;End If       &lt;br /&gt;oLogging.CreateEntry sSName &amp;amp; &amp;quot;: Actions completed&amp;quot;,LogTypeInfo&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier" size="1"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;The completed script can be added to your MDT task sequence towards the end - so that it runs before the machine SysPreps and reboots for capture.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;The complete script - in MDT format (to include logging and access to classes from ZTIUtility.wsf) with a number of other changes included is available on the Deployment Guys SkyDrive:&lt;/font&gt;&lt;/p&gt; &lt;iframe style="border-right: #dde5e9 1px solid; padding-right: 0px; border-top: #dde5e9 1px solid; padding-left: 0px; padding-bottom: 0px; margin: 3px; border-left: #dde5e9 1px solid; width: 240px; padding-top: 0px; border-bottom: #dde5e9 1px solid; height: 66px; background-color: #ffffff" marginwidth="0" marginheight="0" src="http://cid-7be6feba9e7c999c.skydrive.live.com/embedrowdetail.aspx/DeploymentGuys/zCFG-DefaultUser.zip" frameborder="0" scrolling="no"&gt;&lt;/iframe&gt;  &lt;p&gt;This post was contributed by &lt;b&gt;Richard Smith&lt;/b&gt; a Senior Consultant with Microsoft Services, UK.&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3067042" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Scripts/default.aspx">Scripts</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Deployment/default.aspx">Deployment</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Utilities/default.aspx">Utilities</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Support/default.aspx">Support</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Windows+Vista/default.aspx">Windows Vista</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Default+User/default.aspx">Default User</category></item></channel></rss>