Move your apps from XP to Windows 7
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.
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:
When the New Deployment Share Wizard completes successfully, your deployment share appears in the DW under the Deployment Shares node.
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:
Windows 7 will now be listed under the Operating Systems node.
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:
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:
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\\}
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:
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
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:
You need to update your deployment share before you perform your first migration. Follow these steps:
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:
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:
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.
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:
\\[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:
Replace scenario. To deploy applications to a client in a replace scenario, follow these steps:
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).
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.