WMI queries to find 64 and 32 bit computers:
SELECT * FROM Win32_OperatingSystem WHERE OSArchitecture = "64-bit"
SELECT * FROM Win32_OperatingSystem WHERE OSArchitecture = "32-bit"
Discussions about system management technologies. Including, but not limited to, ConfigMgr, WDS, MDT, WSUS, Forefront, VMM, Hyper-V etc.
WMI queries to find 64 and 32 bit computers:
SELECT * FROM Win32_OperatingSystem WHERE OSArchitecture = "64-bit"
SELECT * FROM Win32_OperatingSystem WHERE OSArchitecture = "32-bit"
Using ConfigMgr 2012 RC2 OSD I got the bellow error (Message ID 11135):
The task sequence execution engine failed executing the action (Apply Operating System) in the group (Build the Reference Machine) with the error code 2147942402
Action output: , dwFlags, hUserToken, pszUserName, pszUserPassword), HRESULT=80070002 (e:\nts_sccm_release\sms\framework\tscore\resolvesource.cpp,3217)
ResolveSource(pszSource, sSourceDirectory, dwFlags, 0, 0, 0), HRESULT=80070002 (e:\nts_sccm_release\sms\framework\tscore\resolvesource.cpp,3122)
TS::Utility::ResolveSource( this->packageID, this->packagePath, TS::Utility::ResolveSourceFlags::PersistContents ), HRESULT=80070002 (e:\nts_sccm_release\sms\client\osdeployment\applyos\installscripted.cpp,160)
installer.install(), HRESULT=80070002 (e:\nts_sccm_release\sms\client\osdeployment\applyos\installscripted.cpp,632)
Entering ReleaseSource() for C:\_SMSTaskSequence\Packages\TST0000B
The user tries to release a source directory C:\_SMSTaskSequence\Packages\TST0000B that is either already released or we have not connected to it
InstallScripted( g_InstallPackageID, g_ImageIndex, targetVolume, g_ConfigPackageID, g_ConfigFileName ), HRESULT=80070002 (e:\nts_sccm_release\sms\client\osdeployment\applyos\applyos.cpp,493). The operating system reported error 2147942402: The system cannot find the file specified.
The problem was that for the Network Access Account I left “Use the computer account of the Configuration Manager client” in the Software Distribution Component properties. As soon as I have replaced it with a standard user account, the Task Sequence finished successfully.
Besides using Software Distribution to install software, you can do this using a Task Sequence too. This can be done during and Operating System Deployment process or not.
Usually, I install software during an OSD. For this, you must have a package for that software product (of course) and at least one program that runs silently. If the program requires user intervention, you will not have the possibility to add it to your TS. I hope you know the fact that the package should exist on a Distribution Point.
This is how one of my simplest TSs looks like:
To add an Install Software step, in your TS click Add from the menu and select General – Install Software.
Then, type a name for this step and using the Browse button select a package to add the TS. Remember that you can only add packages that has a program to run without user intervention.
I find it useful to have a step to install latest updates after all install software steps.
One more way to install software using a TS, is to have only Install Software steps. This way, you can install multiple software products using one advertisement instead of advertising every package. I use this only when I have an OS installed and I want to install software on it.
Following the post regarding how to install drivers based on computer model using WMI query, here is another query you can use in your task sequences to install some processor specific software for example.
To find the processor manufacturer during a task sequence, insert a condition for the step you need, and select Query WMI. Then, for WMI Namespace use root\cimv2. For WQL Query use SELECT * FROM Win32_Processor WHERE Manufacturer like “%GenuineIntel%” or SELECT * FROM Win32_Processor WHERE Manufacturer like “%AuthenticAMD%” depending on what you need.
To find the processor manufacturer of your computer, open a command prompt and type the following: WMIC CPU GET Manufacturer.
Our helpdesk asked me to make a task sequence that can be used on computers with more than one partition. In this case, I had to make sure that the operating system will install only on first partition and will not touch the data on other partitions.
To achieve this, I copied another TS and modified the following 2 steps:
This way, when TS runs, it automatically wipes partition 1 from disk 0 and will not touch any other partition or disk.

When using task sequence, you might want to install different driver packages for different computer models. This can be accomplished by using a WMI query.
First of all you need to have driver packages for all your computer models and know the exact model name for every computer.
To find this, open a command prompt and type WMIC ComputerSystem GET Model (use this command on every computer to find it’s model).
Then, Edit your task sequence. Add how many steps you need with “Apply Driver Package”. Select the driver package you have created for a certain computer model (HP dc5700 in my case).

In the Options tab, click Add Condition and select Query WMI. In the WMI Query Properties window, make you sure you have root\cimv2 as WMI Namespace and write the following query in the WMI Query input box:
SELECT * FROM Win32_ComputerSystem WHERE Model LIKE “%dc5700%” for HP Compaq dc5700 computer models.
![]()
Now, for every driver package, replace the model name with the computer model name the driver package is for. This way, the task sequence will install the correct drivers on every computer that will match the model specified in the query and will skip other steps sending the following status message: “The task sequence execution engine skipped the action (HP Compaq dc5700) in the group (Apply driver packages) because the condition was evaluated to be false”.
Short post that I think might be useful…
If you receive the following error: “An error occurred while retrieving policy for this computer (0x80072EE7)” when Task Sequence Wizard starts, this can happen if you have DHCP or DNS problems.
You should check if you can contact the DHCP server in order to get an IP address or you can configure a static IP address.

If you have a switch with STP enabled, you might want to read this post.
After the task sequence to deploy the reference computer (Home-XPSP3-Ref01) finishes, a captured image of the reference computer is stored in \\Home-SCCM\Captures$\Home-XPSP3-Ref01.wim. Now, We’ll create a task sequence that will deploy the captured image of reference computer to the target computer (Home-XPSP3-Tar01).
To create a task sequence to deploy the captured image to the target computer:
| On this wizard page | Select Client Task Sequence, and then click Next. |
| General | In Task sequence name, type Windows XP SP3 Target Deployment. In Task sequence comments, type Task sequence for deploying captured reference computer image to the target computer (Home-XPSP3-Tar01), and then click Next. |
| Details | Click Join a domain. In Workgroup, type Home.local. In User name, type Work User. In Organization name, type Work Organization. In Product key, type product_key (where product_key is the product key for Windows XP SP3). In Capture destination, type \\Home-SCCM\Captures$\Home-XPSP3-Ref01.wim. In Capture Account, click Set, and then complete the Windows User Account dialog box by performing the following steps:
Click Next. |
| Boot Image | In Specify an existing boot image package, click Browse. In Select a package dialog box, click Windows PE Custom, and then click OK. Click Next. |
| MDT Package | In Specify an existing Microsoft Deployment Toolkit Files package, click Browse. In the Select a Package dialog box, click MDT 2008 Files, and then click OK. Click Next. |
| MDT Package: MDT Details | In Name, type MDT 2008 Files. In Version, type 1.00. In Comments, type Provides access to MDT 2008 software during Configuration Manager deployment process, and then click Next. |
| OS Image | Click Create a new OS image. In OS image file (WIM) location, type \\Home-SCCM\Captures$\Home-XPSP3-Ref01.wim. In Package source folder to be created, type \\Home-SCCM\Packages$\Home-XPSP3-Ref01_Image. Click Next. |
| OS Image: Image Details | In Name, type Windows XP SP3 Reference Image. In Version, type 1.00. In Comments, type Windows XP SP3 captured image of reference computer (Home-XPSP3-Ref01) used to deploy to target computers, and then click Next. |
| Client Package | In Specify an existing ConfigMgr client package, click Browse. In the Select a Package dialog box, click Configuration Manager Client Upgrade, and then click OK. Click Next. |
| USMT Package | In Specify an existing USMT package, click Browse. In the Select a Package dialog box, click USMT, and then click OK. Click Next. |
| Settings Package | Click Create a new settings package. In Package source folder to be created, type \\Home-SCCM\Packages$\CustomSettings_Target, and then click Next. |
| Settings Package: Settings Details | In Name, type MDT 2008 Target Computer Custom Settings. In Version, type 1.00. In Comments, type Configuration settings for MDT 2008 deployment process (such as CustomSettings.ini) for the target computer, and then click Next. |
| Sysprep Package | In Specify an existing Sysprep package, click Browse. In the Select a Package dialog box, click Configuration Windows XP SP3 Sysprep, and then click OK. Click Next. |
| Summary | Displays a status bar that shows the progress of the tasks defined in the wizard. The Import Microsoft Deployment Task Sequence Wizard closes when the task sequence is imported. |
By default, the task sequence sets the password for the local Administrator account to a random value. At this step we will specify the password we want.
To customize the Windows Vista Target Deployment task sequence:
Running the Import Microsoft Deployment Task Sequence Wizard to create the task sequence for the target computers, creates a new software distribution package and a new image.
To select the distribution points for software distribution package:
| On this wizard page | Do this |
| Welcome | Click Next. |
| Select Destination Distribution Point | Click Next. |
| Package | In Distribution points, select HOME-SCCM, and then click Next. |
| Completion | Click Next. |
| Wizard Completed | Click Close. |
To select the distribution points for operating system images:
| On this wizard page | Do this |
| Welcome | Click Next. |
| Select Destination Distribution Point | Click Next. |
| Package | In Distribution points, select HOME-SCCM, and then click Next. |
| Completion | Click Next. |
| Wizard Completed | Click Close. |
To create an advertisement for the task sequence:
| On this wizard page | Do this |
| General | In Comment, type Advertisement to deploy Windows XP SP3 reference image. In Collection, click Browse. In the Browse Collection dialog box, click All Unknown Computers, and then click OK. Select the Make this task sequence available to boot media and PXE check box. Click Next. |
| Schedule | Click Next. |
| Distribution Point | Click Next. |
| Interaction | Click Next. |
| Security | Click Next. |
| Summary | Click Next. |
| Confirmation | Click Close. |
Now, we can boot Home-XPSP3-Tar01 computer from the ConfigMgr2007_TS_Boot_Media.iso file created earlier.
On the Welcome to the Task Sequence Wizard page, in the Password field type P@ssw0rd and press Next. You will see that there are two assignments: Windows XP SP3 Reference Deployment and Windows XP SP3 Target Deployment. Select Windows XP SP3 Target Deployment and click Next to start the operating system deployment.

The operating system deployment starts. If any problems occur during the deployment, consult the MDT 2008 document or learn how to troubleshoot task sequence issues in Configuration Manager.
And that was the simplest way (and with any configuration made to the operating system) to make an image of a reference computer and then use that image to deploy target computers.
This post is especially for those few to whom I told how easy is to deploy Windows Vista with Configuration Manager 2007 SP1 R2 and who told me that they will use Windows XP few more months. In this post, I will show how to deploy Windows XP SP3 (the easiest and least customizable way) in a virtual environment (Virtual PC 2005 SP1) step-by-step. This post is inspired from “Quick Start Guide for Microsoft System Center Configuration Manager 2007” document.
In this post, I will create a reference machine with Windows XP SP3 and will capture an image of it. And in the then next post, I will use the captured image to create a new task sequence that can be used to deploy Windows XP SP3 to target machines.
My environment is described below (note that all operating systems and products used are x86 versions):
| Computer | Description and system resources |
| Home-DC1 | The computer runs Windows Server 2003 SP1 with the following roles and services installed:
The system resources of the computer are as follows:
|
| Home-SCCM | This computer runs SQL Server 2005 SP2 and System Center Configuration Manager 2007 SP1 R2 fully working. The computer runs Windows Server 2003 SP2 R2. The system resources of the computer are as follows:
|
| Home-XPSP3-Ref01 | This is the reference computer, which runs no current operating system. The system resources of the computer are as follows:
|
| Home-XPSP3-Tar01 | This is the target computer, which runs no current operating system.
|
So, let’s start.
The MDT 2008 deployment process requires additional folders that are used as the source for files or to store files created during the MDT 2008 deployment process. Some of these folders need to be shared so that they can be accessed from other computers.
To create the required folders and shares:
| Share name | Share permissions | Security permissions |
| Captures$ Packages$ Source$ |
Administrators: Full Control Everyone: Read SYSTEM: Full Control |
Administrators: Full Control Creator owner: leave as default SYSTEM: Full Control Users: Read & Execute, List Folder Contents |
Note: Please note that I do not have the “Drivers” folder as I’m installing the OS in a virtual machine and I will not use any drivers.
Besides the OS, SQL, Configuration Manager and other software installed already, we will also need the software listed below:
| Obtain this software | Place in this folder |
| MDT 2008 Update 1, available at http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=3bd8561f-77ac-4400-a0c1-fe871c461a89 |
C:\Source\MDT2008 |
| Windows XP SP3 distribution files from the product CD | C:\Source\Windows_XPSP3 |
| USMT version 3.0.1 available at http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=799ab28c-691b-4b36-b7ad-6c604be4c595 |
C:\Source\USMT301 |
| Sysprep for Windows XP SP3 available at http://www.microsoft.com/downloadS/details.aspx?FamilyID=673a1019-8e3e-4be0-ac31-70dd21b5afa7&displaylang=en |
Extracted files from “deploy.cab” place in C:\Source\Sysprep_XPSP3 |
The USMT is used to save and restore user state migration information.
Install USMT on Home-SCCM in order to extract the files needed to create the System Center Configuration Manager package.
To install USMT 3.0.1:
To install MDT 2008 Update 1:
To enable Configuration Manager console integration:
Note: Ensure that Configuration Manager Console is closed while performing these steps.

The reference computer is used as the template for deploying new images to the target computers. Configure this computer (Home-XPSP3-Ref01) exactly as the target computers will be configured. An image of the reference computer will be captured and the image deployed to the target computers.
To create a task sequence for deploying the reference computer:
| On this wizard page | Do this |
| Choose Template | Select Client Task Sequence, and then click Next. |
| General | In Task sequence name, type Windows XP SP3 Reference Deployment. In Task sequence comments, type Task sequence for deploying Windows XP SP3 to the reference computer (Home-XPSP3-Ref01), and then click Next. |
| Details | Click Join a workgroup. In Workgroup, type WORKGROUP. In User name, type Work User. In Organization name, type Work Organization. In Product key, type product_key (where product_key is the product key for Windows XP SP3). In Capture destination, type \\Home-SCCM\Captures$\Home-XPSP3-Ref01.wim. In Capture Account, click Set, and then complete the Windows User Account dialog box by performing the following steps:
Click Next. |
| Boot Image | Click Create a new boot image package. In Package source folder to be created, type \\Home-SCCM\Packages$\WinPE_Custom, and then click Next. |
| Boot Image: General Settings | In Name, type Windows PE Custom. In Version, type 1.00. In Comments, type Customized version of Windows PE to be used in deployment of reference and target computers, and then click Next. |
| Boot Image: Image Options | Click Next. |
| MDT Package | Click Create a new Microsoft Deployment Toolkit Files package. In Package source folder to be created, type \\Home-SCCM\Packages$\MDT_2008_Files, and then click Next. |
| MDT Package: MDT Details | In Name, type MDT 2008 Files. In Version, type 1.00. In Comments, type Provides access to MDT 2008 software during Configuration Manager deployment process, and then click Next. |
| OS Image | Click Create a new OS install package. In OS installation folder location, type \\Home-SCCM\Source$\Windows_XPSP3. In Package source folder to be created, type \\Home-SCCM\Packages$\Windows_XPSP3, and then click Next. |
| OS Image: Image Details | In Name, type Windows XP SP3. In Version, type 1.00. In Comments, type Windows XP SP3 package used to deploy to reference computers, and then click Next. |
| Client Package | Click Create a new ConfigMgr client package, and then click Next. |
| USMT Package | Click Create a new USMT package. In Path to USMT executables and related files, type \\Home-SCCM\Source$\USMT301. In Package source folder to be created, type \\Home-SCCM\Packages$\USMT301, and then click Next. |
| USMT Package: USMT Details | In Name, type USMT. In Version, type 3.0.1. In Comments, type USMT files used to capture and restore user state migration information, and then click Next. |
| Settings Package | Click Create a new settings package. In Package source folder to be created, type \\Home-SCCM\Packages$\CustomSettings_Reference, and then click Next. |
| Settings Package: Settings Details | In Name, type MDT 2008 Reference Computer Custom Settings. In Version, type 1.00. In Comments, type Configuration settings for MDT 2008 deployment process (such as CustomSettings.ini) for the reference computer, and then click Next. |
| Sysprep Package | Click Create a new Sysprep package. In Path to Sysprep executables and related files, type \\Home-SCCM\Source$\Sysprep_XPSP3. In Package source folder to be created, type \\Home-SCCM\Packages$\Sysprep_XPSP3, and then click Next. |
| Sysprep Package: Sysprep Details | In Name, type Windows XP SP3 Sysprep. In Version, type 1.00. In Comments, type Sysprep files needed to deploy Windows XP SP3, and then click Next. |
| Summary | Displays a status bar that shows the progress of the tasks defined in the wizard. The Import Microsoft Deployment Task Sequence Wizard closes when the task sequence is imported. This process can take several minutes to finish. |
When the MDT 2008 task sequence has been imported, customize the MDT 2008 configuration files that provide the configuration settings for deploying Windows XP to the target computer. Specifically, customize the CustomSettings.ini file.
To customize the MDT 2008 configuration files for the reference computer:
1. In Windows Explorer, go to C:\Packages$\CustomSettings_Reference, and then double-click CustomSettings.ini.
2. In Notepad, add DoCapture=Yes to the end of the CustomSettings.ini file.

3. In Notepad, save the file, and then exit Notepad.
By default, the task sequence sets the password for local Administrator account to a random value. At this step we will specify the password we want.
To customize the Windows Vista Reference Deployment task sequence:
The Import Microsoft Deployment Task Sequence Wizard created a number of packages and images. After these packages and images were modified as needed, we will select the distribution points from which the packages and images will be copied and available to target computers.
To select the distribution points for software distribution packages:
| On this wizard page | Do this |
| Welcome | Click Next. |
| Select Destination Distribution Point | Click Next. |
| Package | In Distribution points, select HOME-SCCM, and then click Next. |
| Completion | Click Next. |
| Wizard Completed | Click Close. |
Repeat steps 2–4 of this procedure, substituting each of the following packages for:
To select the distribution points for boot images:
| On this wizard page | Do this |
| Welcome | Click Next. |
| Select Destination Distribution Point | Click Next. |
| Package | In Distribution points, select HOME-SCCM, and then click Next. |
| Completion | Click Next. |
| Wizard Completed | Click Close. |
To select the distribution points for operating system installation packages:
| On this wizard page | Do this |
| Welcome | Click Next. |
| Select Destination Distribution Point | Click Next. |
| Package | In Distribution points, select HOME-SCCM, and then click Next. |
| Completion | Click Next. |
| Wizard Completed | Click Close. |
A method must be provided for starting the computer with Windows PE and the necessary software to initiate the MDT 2008 process. At this step we’ll create the task sequence bootable media by using the Task Sequence Media Wizard and will use the .iso file to boot a new virtual machine with no operating system installed, just a new unformatted virtual hard disk.
To create task sequence bootable media:
| On this wizard page | Do this |
| Select Media Type | Click Bootable media, and then click Next. |
| Media type | In Media file, type \\Home-SCCM\Captures$\ConfigMgr2007_TS_Boot_Media.iso, and then click Next. |
| Security | In Password and Confirm password, type P@ssw0rd, and then click Next. |
| Boot image | In Boot image, click Browse. In the Select a Boot Image dialog box, click Windows PE Custom, and then click OK. Click Next. |
| Summary | Click Next. |
| Confirmation | Click Close. |
The wizard creates the “ConfigMgr2007_TS_Boot_Media.iso” file in the \\Home-SCCM\Captures$ shared folder.
As I want to deploy Windows XP SP3 to bare-metal machines (which ConfigMgr doesn’t know about), I have to create an advertisement for All Unknown Computers collection.
To create an advertisement for the task sequence:
| On this wizard page | Do this |
| General | In Comment, type Advertisement to deploy Windows Vista to the reference computer and then capture an image of the reference computer. In Collection, click Browse. In the Browse Collection dialog box, click All Unknown Computers, and then click OK. Select the Make this task sequence available to boot media and PXE check box. Click Next. |
| Schedule | Click Next. |
| Distribution Points | Click Next. |
| Interaction | Click Next. |
| Security | Click Next. |
| Summary | Click Next. |
| Confirmation | Click Close. |
As “Home-XPSP3-Ref01″ is a virtual machine, at this point I will start it and boot from the created ISO file.
On the Welcome to the Task Sequence Wizard page, in the Password field type P@ssw0rd and press Next. You will see that there is only one assignment: Windows XP SP3 Reference Deployment. Select it and click Next to start the operating system deployment.

The last task sequence action will capture an image of the reference computer.

If any problems occur during the deployment, consult the MDT 2008 documentation or learn how to troubleshoot task sequence issues in Configuration Manager.
In the next post I will use the captured image to create a task sequence for target machines.
Suppose you have created a task sequence, advertised it and booted from task sequence media or however you want; if you receive the following error: “Task Sequence: <TS name> has failed with the error code (0×80004005). For more information, please contact your system administrator or helpdesk operator.” at Setup Windows and ConfigMgr step you might want to check the Product Key! Most probably the key is not correct, so either write another one or remove the product key at all from Apply Windows Settings step in your task sequence and you will have to provide it during the install phase.
I left the product key blank and next time I booted the PC from the TS media, at the Setup Windows and ConfigMgr step I was asked to provide a product key. I entered my Business edition product key and everything was ok.