When you use Microsoft Deployment Toolkit (MDT) 2010 to migrate Windows XP workstations to Windows 7, applications currently installed on XP aren’t migrated to Windows 7—at least not by default. But with just a little work and tweaking on your part, MDT can perform something close to application migration.

There are four Windows 7 installation scenarios: refresh, replace, bare-metal, and upgrade. A refresh scenario simply updates the OS of an existing computer. A replace scenario replaces the physical computer and the OS. Bare-metal installations are performed on computers with no OS installed or by wiping the current OS and installing from scratch. Upgrades are possible only from Windows Vista (not XP). Although you could technically upgrade XP to Vista, then Vista to Windows 7, doing so isn’t really feasible.

PROBLEM: You need to migrate your Windows XP machines to Windows 7 without having to manually reinstall every application.

SOLUTION: Use MDT 2010 to create a repeatable migration scenario complete with applications and their settings.

WHAT YOU NEED: MDT 2010; a deployment share as described in InstantDoc ID 103607; a task sequence as described in InstantDoc ID 125154; an application added to the Deployment Workbench (DW)

SOLUTION STEPS:
1. Create a deployment share
2. Import Windows 7
3. Add applications to the DW
4. Find application information from XP
5. Configure MDT DW with XP application information
6. Create a task sequence
7. Update the deployment share
8. Migrate XP workstations

DIFFICULTY: 4 out of 5

 

In this article I explain how to set up MDT 2010 to reinstall applications found on XP workstations and apply the applications’ settings after Windows 7 has been installed in a refresh scenario. I also discuss how to force application installation in bare-metal and replace scenarios.

Before you start, you need to install MDT 2010, which is available as a free download from Microsoft. MDT 2010 requires the Windows Automated Installation Kit for Windows 7. After you install MDT, the snap-in you’ll use is the Deployment Workbench (DW). You can find the DW under Start, All Programs, Microsoft Deployment Toolkit, Deployment Workbench.

 

Step 1: Create a Deployment Share

A deployment share is the shared folder your client/target machines connect to during the deployment process. Ensure that your machines have network connectivity and permissions to the deployment share. To create a deployment share within the DW, right-click the Deployment Shares node and select New Deployment Share. Then follow these steps:

  1. Click Browse on the Path page and enter a path for your new deployment share (the folder doesn’t have to exist; MDT creates it). I recommend creating your deployment share on a hard drive other than where your system and boot volumes reside. My deployment share is F:\DeploymentShare. Click Next.
  2. On the Share page, enter the shared folder name of your choice or accept the default name DeploymentShare$. Click Next.
  3. The Descriptive Name page lets you provide a description for your deployment share. Accept the default of MDT Deployment Share or enter your own. Click Next.
  4. On the Allow Image Capture page, accept the default setting Ask if an image should be captured. Click Next.
  5. On the Allow Admin Password page, accept the default setting for not asking users to set the local administrator password during deployment. Click Next.
  6. The Allow Product Key page lets you choose whether to be prompted for a product key during deployment; accept the default to not be prompted. Click Next.
  7. The Summary page displays the choices you made in the New Deployment Share Wizard. Click Next to create the deployment share.
  8. The Progress page displays the steps necessary to create the deployment share, then disappears. Click Finish on the Confirmation page.

When the New Deployment Share Wizard completes successfully, your deployment share appears in the DW under the Deployment Shares node.

 

Step 2: Import Windows 7 into the DW

Before you can deploy Windows 7, you need to import the OS into the DW. To import Windows 7 from within the DW, expand your newly created deployment share, right-click the Operating Systems node, and select Import Operating System. Then follow these steps:

  1. On the OS Type page, select Full set of source files and click Next.
  2. On the Source page, click the Browse button to navigate to the root of the Windows 7 CD-ROM or the folder where you copied the Windows 7 CD-ROM.
  3. The Destination page prompts you for the name of the folder in which to store Windows 7. Enter W7 and click Next.
  4. The Summary page displays the details for the Import Operating System Wizard. Review your choices, make any necessary changes, and click Next.
  5. The Progress page appears, then disappears. Click Finish on the Confirmation page.

Windows 7 will now be listed under the Operating Systems node.

 

Step 3: Add Applications to the DW

Applications must be added to the DW before they can be deployed to Windows 7 machines. In this example I added XML Notepad (which is free from Microsoft). I created the C:\Applications folder and copied XMLNotepad.msi into it. To add XML Notepad to the DW, right-click the Applications node and select New Application. Then follow these steps:

  1. On the Application Type page, select Application with source files and click Next.
  2. The Details page requires an application name. You can also provide the publisher, version, and language if you choose. Enter XML Notepad for your application name and click Next.
  3. Click Browse on the Source page and navigate to the C:\Applications folder. Click OK, then Next.
  4. The Destination page creates a directory name in which to store XMLNotepad. This information is concatenated from the Details page. Accept the default name or change it to whatever you like; click Next.
  5. The Command Details page requires the command line to install the application silently. Enter msiexec /i xmlnotepad.msi /qn /norestart and click Next.
  6. On the Summary page, review your choices and click Next.
  7. Click Finish on the Confirmation page.

 

Step 4: Find Application Information

To migrate applications in a refresh scenario, you must first determine which of the applications currently installed on your XP workstations need to be migrated to Windows 7. Organizations often have more than one version of the same application, so your first task is to decide which applications will become your standard applications, as well as the versions of the applications you ultimately want installed on Windows 7. After you compile your list of applications, finding the information you’ll need to configure MDT with is a bit of a mission because MDT uses the application’s Uninstall registry key. To find an application’s Uninstall registry key name, follow these steps:

  1. Log on as a standard user to an XP workstation that has the applications installed. Select Run from the Start menu, enter Regedt32, and click OK to open the registry (the registry opens in read-only mode).
  2. Navigate to the HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall registry key. Applications installed from a .msi file have a GUID for their Uninstall key; applications installed from a .exe file provide an application name. The .exe application names are easy to find, but the .msi GUID is a bit more cryptic. To determine which application is listed as a GUID, highlight the GUID and look for the DisplayName value. Figure 1 shows .msi and .exe Uninstall keys; you can see how highlighting a GUID shows the DisplayName value. In this example, the .msi application is XML Notepad 2007.       
  3. After finding the application you want, right-click the application’s Uninstall key and select Copy Key Name. Then paste the Uninstall key name into a Notepad document, like so:

       HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\\\{FC7BACF0-1FFA-4605-B3B4-A66AB382752D\\}

Although the entire path to the key and the key name are copied, the only piece you really want is the GUID itself (including the curly braces): \\{FC7BACF0-1FFA-4605-B3B4-A66AB382752D\\}. When I need to gather information for more than one application, I like to build a list such as this one:

        XMLNotepad = \\{FC7BACF0-1FFA-4605-B3B4-A66AB382752D\\}
        NetMon 3.3 = \\{365C5A10-6561-454F-B975-56EA878D0A06\\}
        Office 2007 = \\{90120000-002A-0000-1000-0000000FF1CE\\}

 

Step 5: Configure MDT 2010 with Application Information

Now that you have a list of application uninstall keys, you can use them to configure MDT’s DW. Open the DW and add each application to be installed on Windows 7, as you did for XML Notepad. After the application is added to the DW, it will appear in the Details pane. Next you need to configure the application with the Uninstall key by following these steps:

  1. Open the application’s properties by double-clicking the application name displayed in the Details pane (or by right-clicking the application and selecting Properties).
  2. Go to the Details tab and enter the Uninstall registry key name (copy and paste it from the Notepad document you created earlier). Figure 2 shows the Details tab of my XML Notepad application with the Uninstall registry key name GUID.

Configure the rest of your applications the same way (i.e., by using their Uninstall keys). Then you need to configure the MDT to search for Uninstall registry keys on your XP machines. Michael Niehaus created a script that performs this operation, but MDT doesn’t include it; you need to create the script and add it to your deployment share. You can copy this script from Michael’s blog (blogs.technet.com/mniehaus/default.aspx?p=2), or you can download the LTIAppDetect.vbs script  from www.deploymentdr.com/Download.html. The script must be named LTIAppDetect.vbs and stored in your deployment share’s Scripts folder. My deployment share is F:\DeploymentShare, so I stored LTIAppDetect.vbs in the F:\DeploymentShare\Scripts folder.

Next, from within the DW, right-click your deployment share and select Properties. Go to the Rules tab to see the default rules for your deployment share, as follows:

 

\\[Settings\\]
Priority=Default
Properties=MyCustomProperty

 

\\[Default\\]
OSInstall=Y
SkipAppsOnUpgrade=YES
SkipCapture=YES
SkipAdminPassword=NO
SkipProductKey=YES

 

To add the LTIAppDetect.vbs script to your deployment share, insert the entry UserExit=LTIAppDetect.vbs after \\[Default\\] as shown and click OK.

 

\\[Settings\\]
Priority=Default
Properties=MyCustomProperty

 

\\[Default\\]
UserExit=LTIAppDetect.vbs
OSInstall=Y
SkipAppsOnUpgrade=YES
SkipCapture=YES
SkipAdminPassword=NO
SkipProductKey=YES

 

Step 6: Create a Task Sequence

A task sequence contains a list of tasks to be performed during the migration and the order in which the tasks run. To create a task sequence from within the DW, right-click the Task Sequence node and select New Task Sequence, then follow these steps:

  1. On the General Settings page, enter XPMig for the task sequence ID and XP to Windows 7 Migration for the task sequence name. Click Next.
  2. The Select Template page lists the built-in templates. Select Standard Client Task Sequence from the drop-down list and click Next.
  3. On the Select OS page, select Windows 7 (which you imported earlier). Click Next.
  4. On the Specify Product Key page, enter a product key if necessary (if you don’t provide a product key now, you’ll be prompted to enter one during deployment). Click Next.
  5. On the OS Settings page, enter your full name, organization, and Internet Explorer (IE) home page information. Click Next.
  6. Provide a password to be used for the target machine’s local administrator account on the Admin Password page; click Next.
  7. The Summary page displays the information you provided. If everything is correct, click Next.
  8. The Progress page displays the steps run to create the task sequence, then disappears. Click Finish on the Confirmation page.

 

Step 7: Update the Deployment Share

You need to update your deployment share before you perform your first migration. Follow these steps:

  1. From within the DW, expand the Deployment Shares node. Right-click your deployment share name and select Update Deployment Share.
  2. The Update Deployment Share Wizard launches and displays the Options page. Accept the default setting Optimize the boot image updating process; click Next.
  3. On the Summary page, review your selections and click Next. The Progress page appears, then disappears. Click Finish on the Confirmation page.

 

Step 8: Migrate XP Workstations 

After your applications are configured with their Uninstall registry keys and MDT is configured to scan for those keys, you can begin the migration. Log on to your XP workstation as a local administrator and run LiteTouch.vbs from your deployment server, as follows:

  1. On the XP workstation, click Start, Run, and enter the Universal Naming Convention (UNC) path of your deployment share’s Scripts folder. For example, my deployment server is named DeploySrv and my deployment share is named DeploymentShare$, so I would enter \\DeploySrv\DeploymentShare$\Scripts. Click OK.
  2. In the window that opens, double-click LiteTouch.vbs to begin the migration.

 

LiteTouch.vbs runs LTIAppDetect.vbs automatically and gathers a list of applications in the DW that contain an Uninstall registry key name value. Next, the script scans the XP workstation’s registry for a matching list of Uninstall registry key names. The list of matching Uninstall registry key names is added to the applications to install task, which is run after Windows 7 is installed.

When LiteTouch.vbs runs, the deployment wizard launches. Perform the following steps in the deployment wizard:

  1. On the Select a task sequence to execute on this computer page, select the XP to Windows 7 Migration task sequence that you created earlier; click Next.
  2. The Choose a migration type page has only one selection available; accept the default selection Refresh this computer and click Next.
  3. The Configure the computer name page displays the current name of the XP workstation; accept the existing name or enter a new computer name and click Next.
  4. On the Join the computer to a domain or workgroup page, select either Join a domain or Join a workgroup (if joining a domain, supply the credentials of an account that has permissions to create computer objects and join machines to the domain); click Next.
  5. On the Specify where to save your data and settings page, select Automatically determine the location, and Allow data and settings to be stored locally when possible; click Next.
  6. The Specify where to save a complete computer backup page lets you create a backup of the existing machine before any changes are made in case you need to roll back. Specify whether you want to create a complete backup (including where to store the backup); click Next.
  7. On the Language and other preferences page, select your language, time and currency format, and keyboard layout; click Next.
  8. Choose your time zone on the Set the Time Zone page and click Next.
  9. The Select one or more applications to install page displays all applications that were added to the DW. The applications you configured with their Uninstall registry keys are displayed as preselected. Accept the preselected applications and click Next.

10.  The Specify the BitLocker configuration page lets you enable or disable BitLocker and specify where to store your recovery key. Make your selections, or choose to not enable BitLocker; click Next.

11.  On the Specify credentials for connecting to network shares page, enter the username and password for an account that has permissions to the shared folders the deployment wizard will connect to; click Next. The selections you make in the deployment wizard determine which shared folders you need connection to; for example, if you choose to store a complete backup of the computer and supply a network path (UNC) to store your backup, this account will need read and write permissions to the folder in which you choose to store the backup.

12.  On the Ready to Begin page, click Begin to start the migration process.

 

After you configure the deployment wizard, you can begin the migration. First the User State Migration Tool (USMT) runs the ScanState utility to gather existing application and user settings (and data). The ScanState utility stores this information locally (if you selected the settings I recommended). ScanState has a specific list of applications that it gathers information for by default. You can find this list, including version numbers, in the Windows Automated Installation Kit’s USMT.chm file. From the machine with the Windows Automated Installation Kit installed, open Windows Explorer and navigate to C:\Program Files\Windows AIK\Docs\CHMs\USMT.chm. Note that for best results, you should migrate the same versions of applications.

When ScanState finishes gathering information, the XP workstation boots into Windows Preinstallation Environment (WinPE) and installs Windows 7. The preselected applications are installed and the USMT LoadState utility runs—which applies the application and user settings and data to the newly installed applications. The result is a Windows 7 workstation complete with the applications and settings that were installed on the XP workstation and configured in MDT’s DW.

The applications that were found on the XP workstation and configured in MDT’s DW appear as preselected applications during the deployment process. Anyone running LiteTouch.vbs can easily deselect one of the preselected applications. To prevent an application from being deselected during the deployment process, you can make those applications mandatory.

To make an application mandatory, change the following line in the LTIAppDetect.vbs script:

 

Set oApplications = oEnvironment.ListItem("Applications")

 

to

 

Set oApplications = oEnvironment.ListItem("MandatoryApplications")

 

The application will still appear as preselected, but you won’t be able to deselect it during the deployment process.

 

Configuring Apps in Bare-Metal and Replace Scenarios

Bare-metal machines are typically new computers that don’t have an OS (so there isn’t an OS to scan for currently installed applications). In a replace scenario you install Windows 7 to a brand-new computer (you can’t store the application and user settings locally on the XP machine you’re replacing). Regardless of the scenario, the steps for configuring MDT are the same.

To configure mandatory applications that will be installed on Windows 7, you must first find the application’s GUID. These GUIDs are different from the previous GUIDs I discussed—these are MDT-generated GUIDs. When applications are added to MDT’s DW, an MDT-generated GUID is created. To find your application’s GUID and configure MDT, follow these steps:

  1. Open Windows Explorer, navigate to your deployment share’s Control folder (e.g., F:\DeploymentShare\Control), and open Applications.xml. I use XML Notepad to edit my .xml files. When XML Notepad is installed, you can simply right-click any .xml file and select the Edit with XML Notepad option. Figure 3 shows my Applications.xml file opened in XML Notepad. Each application added to the DW is listed.
  2. Expand the application’s node and click the GUID to show the MDT-generated GUID in the details pane (on the right). In MDT 2010 Update 1, the application GUID is added to the properties of an application’s Details tab.
  3. Click the field that contains the GUID and copy it to the clipboard (press Ctrl+C).
  4. From within the DW, open your deployment share’s properties (right-click your deployment share and select Properties), then select the Rules tab.
  5. At the bottom of the \\[Default\\] section, add the entry MandatoryApplications001=\\{GUID\\}. (Press Ctrl+V to copy the GUID.) For example, if I wanted to make XML Notepad a mandatory application that is installed on all new installations I would add the line MandatoryApplications001=\\{0992c971-a6b2-48d3-b34e-c96309bd4030\\}. My \\[Default\\] section would then look like this:

 

\\[Default\\]
UserExit=LTIAppDetect.vbs
OSInstall=Y
SkipAppsOnUpgrade=YES
SkipCapture=YES
SkipAdminPassword=NO
SkipProductKey=YES

MandatoryApplications001=\\{0992c971-a6b2-48d3-b34e-c96309bd4030\\}

 

If you added multiple mandatory applications, the second application would be MandatoryApplications002, the third would be MandatoryApplications003, and so on. For every subsequent new computer deployed, this MandatoryApplications list will appear as preselected, and no one can deselect the applications.

Bare-metal scenario. To deploy applications to a bare-metal client, boot the bare-metal machine using the MDT-generated WinPE found in the deployment share’s Boot folder (e.g., F:\DeploymentShare\Boot). You’ll find two WinPEs in a .iso format: LiteTouchPE_x64.iso and LiteTouchPE_x86.iso. Burn the .iso file to a CD-ROM (or create a bootable USB flash drive or external hard drive). If you’re installing a 64-bit OS, boot using LiteTouchPE_x64.iso; if you’re installing a 32-bit OS, boot using LiteTouchPE_x86.iso. The MDT deployment wizard launches automatically and displays the following pages:

  • Welcome Windows Deployment
  • User Credentials
  • Select a task sequence to execute on this computer (select the Standard Client Task Sequence that you created)
  • Configure the computer name
  • Join the computer to a domain or workgroup
  • Specify whether to restore user data
  • Language and other preferences
  • Set the Time Zone
  • Select one or more applications to install (the applications will be preselected)
  • Specify whether to capture an image
  • Specify the BitLocker configuration
  • Ready to begin

 

Replace scenario. To deploy applications to a client in a replace scenario, follow these steps:

  1. On the deployment server (or any server you choose), create and share a folder to store your user and application data and settings (e.g., \\DeploySrv\USMTStore).
  2. From within the DW, create a task sequence using the Standard Client Replace Task Sequence template, accepting all default settings.
  3. On the XP workstation, click Start, Run, and enter the UNC path of your deployment share’s Scripts folder, as in the refresh scenario (e.g., \\DeploySrv\DeploymentShare$\Scripts). Click OK.
  4. Double-click LiteTouch.vbs to launch the deployment wizard.
  5. Select the standard client replace task sequence on the Select a task sequence to execute on this computer page.
  6. On the Specify where to save your data and settings page, select Specify a location. In the location box, enter the path to the folder you created in step 1 (e.g., \\DeploySrv\USMTStore).
  7. On the Specify where to save a complete computer backup page, choose to not store a backup of the computer.
  8. On the Specify credentials for connecting to network shares page, enter a username and password that has permissions to the necessary shared folders (i.e., read and write permissions on \\DeploySrv\USMTStore).
  9. Click Begin on the Ready to begin page. USMT runs the ScanState utility and stores the user and application settings on the server you specified in step 6.

10.  After the user state is stored, the machine boots into WinPE and displays The user state capture was completed successfully. Click Finish.

11.  The machine boots back into XP, at which point you can decommission the computer.

12.  Bring in the new computer and follow the same steps as for a bare-metal installation, with one small difference: On the Specify whether to restore user data page, restore the data from the server where you stored it earlier, in step 6 (e.g., \\DeploySrv\USMTStore).

 

Streamline the Process

Application migration doesn’t need to be difficult. I hope the steps in this article will help you streamline the process in your environment, whether you’re migrating applications in a refresh, bare-metal, or replace scenario.