<?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 : Utilities</title><link>http://blogs.technet.com/deploymentguys/archive/tags/Utilities/default.aspx</link><description>Tags: Utilities</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><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>GImageX Beta for Windows 7 Beta</title><link>http://blogs.technet.com/deploymentguys/archive/2009/02/04/gimagex-beta-for-windows-7-beta.aspx</link><pubDate>Wed, 04 Feb 2009 12:47:12 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3196837</guid><dc:creator>DeploymentGuys</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.technet.com/deploymentguys/comments/3196837.aspx</comments><wfw:commentRss>http://blogs.technet.com/deploymentguys/commentrss.aspx?PostID=3196837</wfw:commentRss><wfw:comment>http://blogs.technet.com/deploymentguys/rsscomments.aspx?PostID=3196837</wfw:comment><description>&lt;p&gt;The Windows Automated Installation Kit (Windows AIK) is a set of tools and documentation that support the configuration and deployment of Microsoft® Windows® operating systems.. By using Windows AIK, you can automate Windows installations, capture Windows images with ImageX, configure and modify images using Deployment Imaging Servicing and Management (DISM), create Windows PE images, and migrate user profiles and data with the User State Migration Tool (USMT).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.autoitscript.com/gimagex" target="_blank"&gt;GImageX&lt;/a&gt; is a third-party graphical version of the ImageX command-line tool from the Windows AIK. &lt;/p&gt;  &lt;p&gt;With the release of the Windows 7 beta and also the beta of the &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=4ad85860-d1f4-42a1-a46c-e039e3d0db5d&amp;amp;displaylang=en" target="_blank"&gt;Windows Automated Installation Kit&lt;/a&gt; I’ve updated GImageX to work with these new beta versions. I’ve also tidied up parts of the documentation around installation and tweaked the “mount” functionality to provide better feedback during the operation.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Please note that GImageX is a &lt;strong&gt;third-party&lt;/strong&gt; tool so please remember that you won’t be able to ring up Microsoft PSS to get support with it! However, it uses the official Microsoft published WIMGAPI SDK which is a supported way of working with WIM files.&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="GImageX Capture Tab" border="0" alt="GImageX Capture Tab" src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/GImageXBetaforWindows7Beta_83F6/gimagex_5.png" width="529" height="450" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;em&gt;GImageX Capture Tab &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The GImageX beta can be &lt;a href="http://www.autoitscript.com/gimagex/#DownloadsBeta" target="_blank"&gt;downloaded here&lt;/a&gt; and the new beta version of the Windows AIK which it requires can be &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=4ad85860-d1f4-42a1-a46c-e039e3d0db5d&amp;amp;displaylang=en" target="_blank"&gt;downloaded here&lt;/a&gt;. Please provide feedback, problems, questions, suggestions to the email address listed in the help file contained in the download. As both GImageX and the v2.0 Windows AIK are beta versions please only use these in test environments.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Disclaimer: The information on this site is provided &amp;quot;AS IS&amp;quot; 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"&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;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;This post was contributed by &lt;strong&gt;Jonathan Bennett &lt;/strong&gt;a Senior Consultant with Microsoft Services, UK.&lt;/em&gt;&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3196837" width="1" height="1"&gt;</description><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/ImageX/default.aspx">ImageX</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Windows+Automated+Installation+Kit/default.aspx">Windows Automated Installation Kit</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/GImageX/default.aspx">GImageX</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Windows+7/default.aspx">Windows 7</category></item><item><title>USMT Error Codes</title><link>http://blogs.technet.com/deploymentguys/archive/2009/01/14/usmt-error-codes.aspx</link><pubDate>Wed, 14 Jan 2009 10:38:10 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3182220</guid><dc:creator>DeploymentGuys</dc:creator><slash:comments>7</slash:comments><comments>http://blogs.technet.com/deploymentguys/comments/3182220.aspx</comments><wfw:commentRss>http://blogs.technet.com/deploymentguys/commentrss.aspx?PostID=3182220</wfw:commentRss><wfw:comment>http://blogs.technet.com/deploymentguys/rsscomments.aspx?PostID=3182220</wfw:comment><description>&lt;p align="justify"&gt;I was recently configuring the User State Migration Tool for a customer’s MDT server when, during the testing phase, the USMT began failing with an error code (‘return code’ or ‘rc’ when you read the MDT log files).&amp;#160; I searched the USMT documentation on TechNet looking for the explanation of what the error code meant, only to discover that I could not find any information at all.&lt;/p&gt;  &lt;p align="justify"&gt;So, after a bit of asking around internally at Microsoft, I have managed to obtain the below list of error codes.&amp;#160; I should point out though that this list of error codes is &lt;em&gt;only&lt;/em&gt; for version 3.01 of the USMT, I don’t know if there are differences for any past or future versions of the tool.&lt;/p&gt;  &lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="724" border="1"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td align="center" width="72"&gt;         &lt;p align="center"&gt;&lt;strong&gt;Error code&lt;/strong&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td align="center" width="650"&gt;         &lt;p align="center"&gt;&lt;strong&gt;Error text&lt;/strong&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;0&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_SUCCESS&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;1&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_DISPLAY_HELP&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;2&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_MEMORY_FAIL&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;3&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_INVALID_PARAMETERS&amp;#160; (Bad command line)&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;4&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_INVALID_STORE_LOCATION&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;5&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_NO_MORE_TOKEN&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;6&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_UNABLE_SET_SCRIPTFILES&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;7&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_UNABLE_GET_SCRIPTFILES&amp;#160; (Can’t find XML file(s) specified in the command-line)&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;8&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_UNABLE_SET_STOREPATH&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;9&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_UNABLE_SET_USERS&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;10&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_UNABLE_FINDMIGUNITS&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;11&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_UNABLE_DOMIGRATION&amp;#160; (A file is in use)&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;12&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_FAILED_MIGSTARTUP&amp;#160; (Error in XML file ‘Bad XML’)&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;13&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_FAILED_SETMIGRATIONTYPE&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;14&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_FAILED_LOCALONLY&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;15&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_UNABLE_GET_WORKINGDIR&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;16&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_UNABLE_SETKEY&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;17&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_UNABLE_READKEY&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;18&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_TOO_LONG_KEYSTRING&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;19&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_UNABLE_SETCOMPRESSION&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;20&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_ERROR_INSUFFICIENT_RIGHTS&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;21&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_UNABLE_DELETE_STORE&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;22&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_UNABLE_SET_BENONADMIN&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;23&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_ERROR_INSUFFICIENT_STRINGBUFFER&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;24&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_ERROR_UNSUPPORTED_PLATFORM&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;25&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_ERROR_UNABLE_TOVERIFY_PLATFORM&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;26&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_UNABLE_SET_EFSMODE&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;27&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_INIT_ERROR&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;28&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_UNABLE_SET_LAC_LAE&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;29&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_ERROR_CORRUPTED_ENCRYPTED_STORE&amp;#160; (Store is encrypted and no or invalid key has been specified)&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;30&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_ERROR_NO_INVALID_KEY&amp;#160; (Store is only compressed but a key has been specified)&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;31&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_ERROR_CORRUPTED_NOTENCRYPTED_STORE&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;32&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_ERROR_LOGFILES_INSIDESTORE&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;33&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_INVALID_PLATFORM_FOR_TARGETXP&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;34&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_STORE_VALID_ONLY_FOR_XP&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;35&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_UNABLE_TO_READ_CONFIG_FILE&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;36&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_INVALID_CONFIG_FILE_FORMAT&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;37&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_ERROR_UNABLE_CREATE_LOGS&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;38&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_ERROR_USE_LAC&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;39&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_FAILED_TO_EXCLUDE_FOLDERS&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;40&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_ERROR_UNABLE_CREATE_PROGRESS_LOG&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td align="center" width="72"&gt;41&lt;/td&gt;        &lt;td valign="top" width="650"&gt;USMT_STATUS_CANCELLED&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Most of the codes are pretty self-explanatory, but I have included some extra information for some of the more cryptic error messages.   &lt;br /&gt;&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;img src="http://blogs.technet.com/aggbug.aspx?PostID=3182220" width="1" height="1"&gt;</description><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/USMT/default.aspx">USMT</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>Non-shrinking WIM files</title><link>http://blogs.technet.com/deploymentguys/archive/2008/08/26/non-shrinking-wim-files.aspx</link><pubDate>Tue, 26 Aug 2008 10:39:03 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3111953</guid><dc:creator>DeploymentGuys</dc:creator><slash:comments>7</slash:comments><comments>http://blogs.technet.com/deploymentguys/comments/3111953.aspx</comments><wfw:commentRss>http://blogs.technet.com/deploymentguys/commentrss.aspx?PostID=3111953</wfw:commentRss><wfw:comment>http://blogs.technet.com/deploymentguys/rsscomments.aspx?PostID=3111953</wfw:comment><description>&lt;p&gt;&lt;/p&gt;  &lt;p&gt;If you make regular changes to your WIM files with the use of the /MOUNTRW or /DELETE switches of IMAGEX, then you may have noticed that your WIM files do not shrink in size after you commit the changes back to the file.&amp;#160; You could delete 500mb of data from an image file, only to see the file stay the same size, or even grow by a few megabytes.&amp;#160; The reason for this is that the data in a WIM file are not actually removed from the file when deleted, rather the references to it's contents are simply removed; this is a bit like how deleting a file from your C: drive only deletes the reference to it in the allocation table rather than actually scrubbing all the files binary 1's and 0's from the disk sectors.&lt;/p&gt;  &lt;p&gt;But don't worry, there is a solution to this which you can use to optimise the size of your WIM files!&amp;#160; With the use of the /EXPORT switch of IMAGEX, you simply export the image from the WIM file into a new one, and you can even change the level of compression used.&amp;#160; An example of the use of the command is:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;ImageX.exe /export existing.wim X new.wim &amp;quot;My optimised WIM file&amp;quot;&lt;/strong&gt;&amp;#160;&amp;#160;&amp;#160; &lt;em&gt;(where X is the number of the image file you want to export)&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;If you make regular manual edits to your existing WIM files then you might want to consider including the process of exporting the WIM to a new one into your work routine.&amp;#160; However, it is probably not worth using export if you make infrequent or one off changes.&amp;#160; One important thing to remember when using the export command is not to lose any of the /FLAGS settings during your export!&lt;/p&gt;  &lt;p&gt; The question that clients always ask me about this subject is: why has Microsoft designed IMAGEX like this?&amp;#160; The answer is logical, if not always obvious though at first glance.&amp;#160; So, why does IMAGEX not optimise the file upon every commit action?&amp;#160; Well, for a start, it would be very inefficient to have to do this each time you change the WIM file.&amp;#160; Imagine that you add a 10kb file to a 12Gb WIM, then commit the changes.&amp;#160; You'd have to wait while IMAGEX streams the 12Gb of data into a new WIM file, which would take a very long time.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Finally, I would not consider it good practice manually editing your WIM files on a regular basis.&amp;#160; It would be better to use MDT to include any changes you need to make by incorporating them in future versions of your image files.&amp;#160; Infrequent manual changes are fine, but if you are regularly having to manually edit your WIM files in order to include new files/registry keys etc. then you should be looking at automating this process in order to reduce this required manual administration.&amp;#160; It will make work easier!&lt;/p&gt;  &lt;p&gt;&amp;#160;&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;img src="http://blogs.technet.com/aggbug.aspx?PostID=3111953" width="1" height="1"&gt;</description><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/ImageX/default.aspx">ImageX</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><item><title>Managing Windows Updates</title><link>http://blogs.technet.com/deploymentguys/archive/2008/05/19/managing-windows-updates.aspx</link><pubDate>Mon, 19 May 2008 19:03:49 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3057377</guid><dc:creator>DeploymentGuys</dc:creator><slash:comments>19</slash:comments><comments>http://blogs.technet.com/deploymentguys/comments/3057377.aspx</comments><wfw:commentRss>http://blogs.technet.com/deploymentguys/commentrss.aspx?PostID=3057377</wfw:commentRss><wfw:comment>http://blogs.technet.com/deploymentguys/rsscomments.aspx?PostID=3057377</wfw:comment><description>&lt;p&gt;When creating a new operating system WIM image with MDT, one of the things that you should always examine is the new updates for Windows that you will include; my recommendation has always been to make sure that the image is as up-to-date as possible with all the released Windows updates for the operating system you are going to deploy.&amp;#160; During the testing phase of the image you create, you will be able to identify and catch any possible problems that an update may cause.&amp;#160; I believe that this is a better approach to patching rather than testing and then deploying each individual update as they are released because it requires less time and work from you, but still ensures that an update will not give problems.&lt;/p&gt;  &lt;p&gt;With MDT you add the updates to the workbench (as you can see in the screenshot below) and MDT will install them at the correct point in the installation process, couldn't be simpler!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/ManagingWindowsUpdates_B0E2/image_6.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="197" alt="image" src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/ManagingWindowsUpdates_B0E2/image_thumb_2.png" width="448" border="0" /&gt;&lt;/a&gt; Note: &lt;em&gt;MDT expects the updates in the MSU format, whereas BDD wants the MSI format.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;However, what is not a simple task is the actual job of identifying and downloading all the updates in the first place so that they can be included in MDT.&amp;#160; There are several ways to attack this job:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Install a base Windows XP machine and run Windows Update on it, then note down by hand all of the KB numbers that appear in the list.&amp;#160; You need to be aware that some updates have dependencies on others, so they will not appear in the list until you have installed it's required update beforehand.&amp;#160; This means that you will need to run Windows Update several times on the computer until no new updates are detected.      &lt;br /&gt;Then, go to &lt;a href="http://www.microsoft.com"&gt;www.microsoft.com&lt;/a&gt; and search for each KB article, follow the link to the page and download the file(s).&amp;#160; This is a very slow and laborious task, especially if you have a lot of them to download. &lt;/li&gt;    &lt;li&gt;Only install the service packs when they are released because they contain all previous updates.&amp;#160; This will leave your computer image missing many critical updates for long periods of time because the intervals between service packs is so great, I would not recommend this approach.&amp;#160; Also, what happens after the final service pack for Windows XP is released, will you not patch any further...?&lt;/li&gt;    &lt;li&gt;Use the Windows Update task from the MDT task sequence.&amp;#160; This task will automatically run Windows Update during the execution of the task sequence to ensure that your build is up-to-date.&amp;#160; Unfortunately, it does not yet support proxy servers so sometimes is not a viable choice. &lt;/li&gt;    &lt;li&gt;Update the operating system post-deployment via SMS or the Automatic Updates service.&amp;#160; This is the simplest option, although it exposes your systems to unnecessary risk until they are fully patched. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;All of the methods above will allow you to complete an operating system deployment containing all the latest updates; however as I mentioned above, they all have their drawbacks.&amp;#160; The method I have always used is the first one, as it was the only sure way to have all the required updates, but the job is a slow and tedious one.&amp;#160; A slightly faster way is to use the site &lt;a title="http://catalog.update.microsoft.com" href="http://catalog.update.microsoft.com"&gt;http://catalog.update.microsoft.com&lt;/a&gt; to download the updates as this lets you create a 'shopping basket' and then download them all at once; which is a marginally quicker way to do it but it is still slow.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I recently completed a project to create a set of Windows XP images, and the client wanted the images to contain Service Pack 2 plus all current critical updates (Service Pack 3 was still in beta at the time).&amp;#160; One of the first steps I took was to create the list of KB articles for the updates I would have to download (via the Windows Update method in the list above), and it came out at almost 200 KB articles!&amp;#160; At the thought of a day's work ahead of me clicking around the Microsoft website, I decided to find out if there was an easier way to do this as I did not relish the thought of sitting at my computer to download each and every file manually.&lt;/p&gt;  &lt;p&gt;After searching around, both internally at Microsoft and externally via &lt;a href="http://www.live.com"&gt;live.com&lt;/a&gt;, it became clear that there is not a Microsoft solution to this problem.&amp;#160; However, all was not lost because it seems that someone else had come across the same problem and created a solution for it.&amp;#160; &lt;a href="http://wud.jcarle.com/"&gt;Windows Updates Downloader&lt;/a&gt; will allow you to download all updates since the last service pack for the system that you choose.&amp;#160; As you can see from the image below, it currently lists Service Pack 3 and all the post-SP3 updates that have been released, which are not that many at the time of writing this post although the list is bound to grow somewhat in the future.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/ManagingWindowsUpdates_B0E2/image_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="484" alt="image" src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/ManagingWindowsUpdates_B0E2/image_thumb.png" width="572" border="0" /&gt;&lt;/a&gt;&amp;#160;&amp;#160;&amp;#160; &lt;a href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/ManagingWindowsUpdates_B0E2/image_4.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="193" alt="image" src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/ManagingWindowsUpdates_B0E2/image_thumb_1.png" width="591" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This tool has saved me hours of work and is now a permanent fixture in my array of deployment tools!&amp;#160; Go find out more information about it here: &lt;a title="http://wud.jcarle.com/" href="http://wud.jcarle.com/"&gt;http://wud.jcarle.com/&lt;/a&gt;.&amp;#160; By the way, I must mention that this is not a Microsoft product and that I am not endorsing it in any way.&amp;#160; All and any problems or issues related to it should be directed to the author, not Microsoft.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p mce_keep="true"&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;img src="http://blogs.technet.com/aggbug.aspx?PostID=3057377" width="1" height="1"&gt;</description><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>Dealing With Duplicate User Profile Links in Windows Vista</title><link>http://blogs.technet.com/deploymentguys/archive/2008/05/01/dealing-with-duplicate-user-profile-links-in-windows-vista.aspx</link><pubDate>Thu, 01 May 2008 16:24:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3048176</guid><dc:creator>DeploymentGuys</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.technet.com/deploymentguys/comments/3048176.aspx</comments><wfw:commentRss>http://blogs.technet.com/deploymentguys/commentrss.aspx?PostID=3048176</wfw:commentRss><wfw:comment>http://blogs.technet.com/deploymentguys/rsscomments.aspx?PostID=3048176</wfw:comment><description>&lt;p&gt;&lt;strong&gt;Overview of Windows Vista User Profiles&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;In previous versions of Windows the user's profile was largely hidden away and only the more technically-minded of us would ever knowingly delve into its contents.&amp;#160; With Windows Vista there seems to have been a significant change in that the profile has been dragged sulkily into the spotlight.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="457" alt="CleanProfile_Web" src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/DealingWithDuplicateProfileLinksinWindow_651F/CleanProfile_Web_5.png" width="459" border="0" mce_src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/DealingWithDuplicateProfileLinksinWindow_651F/CleanProfile_Web_5.png" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;em&gt;The Windows Vista user profile&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&amp;#160;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;The Windows Vista user profile is visible everywhere.&amp;#160; It's the very first link in the Start Menu and it appears prominently in Explorer and most Open/Save dialogs. Some dialogs even open directly to this profile location and ignore any &lt;em&gt;Favorite Links&lt;/em&gt;. Many people - including myself - initially tried to rebel against this new behaviour and attempted to hide the profile away again. This usually causes its own set of problems when a user who only understands &lt;em&gt;Documents&lt;/em&gt; and &lt;em&gt;Pictures&lt;/em&gt; suddenly gets a Save dialog with an eyeful of profile. They panic. They blindly click on the root of the C: drive and with brows furrowed in incomprehension they drag the entire contents to the Recycle Bin. Then they pull the power cord out.&lt;/p&gt;  &lt;p&gt;Those are the good users. &lt;em&gt;The rest call the helpdesk&lt;/em&gt;!&lt;/p&gt;  &lt;p&gt;It's much better to embrace the new way of working and provide training around using the user profile to the end users.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Folder Redirection&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Another change in Windows Vista is the ability to independently redirect each of the user profile sub-folders to a network location using Group Policy and Folder Redirection. This can significantly improve logon times in an organisation that uses roaming profiles where users move around lot. A common approach is to redirect the &amp;quot;big hitters&amp;quot; where large files are often stored, such as:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Documents (usually with the addition of Pictures, Music and Videos) &lt;/li&gt;    &lt;li&gt;Desktop &lt;/li&gt;    &lt;li&gt;Downloads &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Let's have a look at our Windows Vista profile after we redirect these:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="507" alt="Duplicate infested profile - The Horror!" src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/DealingWithDuplicateProfileLinksinWindow_651F/DuplicateProfiles_Web_3.png" width="483" border="0" mce_src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/DealingWithDuplicateProfileLinksinWindow_651F/DuplicateProfiles_Web_3.png" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;em&gt;Duplicate infested profile - The Horror!&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;What's going on here?! What are all these duplicates? Which is the real one? If you thought users panicked when they hadn't seen a profile before then you haven't seen a user when presented with duplicate links! And no, a slightly different icon is never a good enough way to tell the difference. &amp;quot;No, don't save it in the one that looks like a folder, save it in the one that looks like a folder with a document on top of the folder&amp;quot;. I think not.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; margin: 10px; border-right-width: 0px" height="53" alt="GPO Move Contents" src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/DealingWithDuplicateProfileLinksinWindow_651F/GPO_MoveContents.png" width="296" align="right" border="0" mce_src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/DealingWithDuplicateProfileLinksinWindow_651F/GPO_MoveContents.png" /&gt; So why does this happen? Well, when redirecting a folder using Group Policy one of the options is to &amp;quot;Move the contents&amp;quot;. Unless this option is selected a duplicate link will be left behind - even when that folder is completely empty. The problem is that depending on the way the infrastructure is set up we can't always safely select this option. &lt;/p&gt;  &lt;p&gt;Here are some common reasons you might &lt;strong&gt;not&lt;/strong&gt; want to use the &amp;quot;move&amp;quot; option:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;The user is often not the owner of the redirected folder&lt;/strong&gt;. Many organisations pre-create redirected folders with administrator ownership to simplify administration. The Group Policy option to move the contents of the redirected folder &lt;em&gt;fails when the user is not the owner&lt;/em&gt;. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Server moves and maintenance&lt;/strong&gt;. Often administrators need to move the location of user data between folders or even servers. If the administrator changes the location of a redirected folder they generally want to move the corresponding files themselves at the same time. Using the Group Policy &amp;quot;move&amp;quot; option, if an administrator changed the redirected location for 10000 users they would need to wait for &lt;em&gt;all 10000 users to logon&lt;/em&gt; for all of the data to be moved. &lt;em&gt;Warning:&lt;/em&gt; Administrators tend to froth at the mouth a little when told this. You could attempt to change the Folder Redirection location and then move the files yourself anyway but this usually causes the Windows client to get confused, especially where Offline Files are involved. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;If none of the above scenarios applies to you then you are very lucky indeed and can stop reading now. The rest can continue on for a possible workaround...&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;A Possible Workaround&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;So, to fix this we need to find a way to automatically remove these duplicate links, let's say on logon. The solution will need to:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Run on any Windows Vista build and not rely on any specific frameworks or runtime libraries which may not be present &lt;/li&gt;    &lt;li&gt;Be able to check if folders have been redirected &lt;/li&gt;    &lt;li&gt;Where a folder has been redirected, be able to work out what the duplicate/default location &lt;em&gt;was&lt;/em&gt; &lt;/li&gt;    &lt;li&gt;Check that the duplicate folder is indeed empty &lt;/li&gt;    &lt;li&gt;Delete duplicates (or recycle them to be safer) &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Usually I'd use VBScript for something like this, but in order to get the redirected and default profile folder locations we need to use the API call &lt;a href="http://msdn.microsoft.com/en-us/library/bb762188(VS.85).aspx" target="_blank" mce_href="http://msdn.microsoft.com/en-us/library/bb762188(VS.85).aspx"&gt;SHGetKnownFolderPath&lt;/a&gt; which means writing a custom application in &lt;a href="http://www.microsoft.com/express/vc/Default.aspx" target="_blank" mce_href="http://www.microsoft.com/express/vc/Default.aspx"&gt;Visual C++ 2008 Express&lt;/a&gt; (or the full version if you have it). What? Why don't I just use VBScript and read the registry keys in &amp;quot;Explorer\Shell Folders&amp;quot; and &amp;quot;Explorer\User Shell Folders&amp;quot;? Because &lt;a href="http://blogs.msdn.com/oldnewthing/archive/2003/11/03/55532.aspx" target="_blank" mce_href="http://blogs.msdn.com/oldnewthing/archive/2003/11/03/55532.aspx"&gt;Raymond says so&lt;/a&gt;, and because &lt;a href="http://technet2.microsoft.com/windowsserver/en/library/fd37cfc0-4ae5-4537-811f-2ccd048040b01033.mspx?mfr=true" target="_blank" mce_href="http://technet2.microsoft.com/windowsserver/en/library/fd37cfc0-4ae5-4537-811f-2ccd048040b01033.mspx?mfr=true"&gt;Technet says so&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;Don't worry about using Visual C++ , it's going to be a &lt;em&gt;tiny&lt;/em&gt; program that's pretty easy to follow for a scripter and you'll be able to act smug around the office and throw lines into conversations like: &amp;quot;VBScript, yeah, that's pretty good.&amp;#160; I guess.&amp;#160; &lt;em&gt;&amp;lt;pause dramatically here&amp;gt;&lt;/em&gt;&amp;#160; Check out my &lt;em&gt;proper&lt;/em&gt; code and cast off your childish ways, mortals!&amp;quot;.&lt;/p&gt;  &lt;p&gt;The sample code will create a program that can be run as follows (from a login script, logoff script, StartUp group, RunOnce registry key - your choice):&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New"&gt;RemoveDuplicateProfileLinks.exe [/norecycle]&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;By default, it will move deleted duplicates to the Recycle Bin (safe) but you can force a full deletion using the optional &amp;quot;/norecycle&amp;quot; switch (less safe).&lt;/p&gt;  &lt;p&gt;Download the sample code here:&lt;/p&gt;  &lt;blockquote&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/RemoveDuplicateProfileLinks.zip" frameborder="0" scrolling="no" mce_src="http://cid-7be6feba9e7c999c.skydrive.live.com/embedrowdetail.aspx/DeploymentGuys/RemoveDuplicateProfileLinks.zip"&gt;&lt;/iframe&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;To compile: &lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="127" alt="ReleaseBuild_Web" src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/DealingWithDuplicateProfileLinksinWindow_651F/ReleaseBuild_Web_1.png" width="329" align="right" border="0" mce_src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/DealingWithDuplicateProfileLinksinWindow_651F/ReleaseBuild_Web_1.png" /&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Open &lt;a href="http://www.microsoft.com/express/vc/Default.aspx" target="_blank" mce_href="http://www.microsoft.com/express/vc/Default.aspx"&gt;Visual C++ 2008 Express&lt;/a&gt;. &lt;/li&gt;    &lt;li&gt;Open the solution file &amp;quot;RemoveDuplicateProfileLinks.sln&amp;quot;. &lt;/li&gt;    &lt;li&gt;Ensure that the &amp;quot;Release&amp;quot; build is active. &lt;/li&gt;    &lt;li&gt;Select the menu &amp;quot;Build \ Rebuild Solution&amp;quot;. &lt;/li&gt;    &lt;li&gt;The code will compile. &lt;/li&gt;    &lt;li&gt;The resulting .exe file will be created in the top-level &amp;quot;Release&amp;quot; folder. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;em&gt;&amp;lt;disclaimer&amp;gt;Remember, this is sample code and you use it at your own risk :)&amp;lt;/disclaimer&amp;gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;A Quick Look at the Code&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;For the geeks among you let's have a quick look at the code. The main functions are in the &amp;quot;RemoveDuplicateProfileLinks.cpp&amp;quot; file and consist of:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;wWinMain()&lt;/strong&gt; and &lt;strong&gt;CheckFolder()&lt;/strong&gt; - These do most of the work in reading command-line parameters, checking for redirection and deleting duplicates. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;IsVistaOrLater()&lt;/strong&gt; - Checks if we are running Windows Vista or later. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;IsValidDir()&lt;/strong&gt; - Checks if a given folder exists. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;MyGetFullPathName()&lt;/strong&gt; - Expands a given folder into it's non-relative and long path name version. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;IsFolderEmpty()&lt;/strong&gt; - Checks if a folder is empty and suitable for deletion. We have to be a little careful as duplicate profile links tend to still contain files like &amp;quot;desktop.ini&amp;quot; and junction points to &amp;quot;My Pictures&amp;quot; and the like. You can modify this function to suit your environment, but as it stands it should work well for a clean Windows Vista build that has just logged on and had a number of folders redirected. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;FileRecycle()&lt;/strong&gt; - Handles deletion or recycling of a folder. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The main two functions wWinMain() and CheckFolder() are shown below so you can see what you are getting yourself into:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="604" alt="Code1" src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/DealingWithDuplicateProfileLinksinWindow_651F/Code1_5.png" width="741" border="0" mce_src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/DealingWithDuplicateProfileLinksinWindow_651F/Code1_5.png" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;em&gt;The WinMain() function&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="535" alt="Code2" src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/DealingWithDuplicateProfileLinksinWindow_651F/Code2_3.png" width="639" border="0" mce_src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/DealingWithDuplicateProfileLinksinWindow_651F/Code2_3.png" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;em&gt;The CheckFolder() function&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;That wasn't so hard was it?&amp;#160; It's not rocket science after all - it's just brain surgery... Let me know how you get on with this and if you have any other ideas or suggestions. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;This post was contributed by &lt;strong&gt;Jonathan Bennett &lt;/strong&gt;a Senior Consultant with Microsoft Services, UK.&lt;/em&gt;&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3048176" 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></item></channel></rss>