[Editor’s note: this post was originally published on Garry Martin’s blog on 28 October 2009. As Garry’s closing down his own site but the content is still valid, he asked me if I’d like to post it here and I gratefully accepted!]
I’m running a Proof of Concept (PoC) at work at the moment which is making use of Microsoft Deployment Toolkit (MDT) 2010. Whilst most of the drivers we need can be managed by using the Out-of-Box Drivers Import function, some are delivered by the OEM as .EXE or .MSI packages. Whilst we could use multiple Task Sequences to manage these, or even select the applications individually at build time, our preference was to use some sort of hardware specific targeting.
Process
First of all, we needed to uniquely identify the hardware, and for this purpose we used the Plug and Play (PnP) Device ID, or hardware ID as it is sometimes called.
To determine the hardware IDs for a device by using Device Manager:
- Install the device on a test computer
- Open DeviceManager
- Find your device in the list
- Right-click the entry for your device, and then click Properties
- In the Device Properties dialog box, click the Details tab
- In the Property list, click Hardware Ids
- Under Value, make a note of the characters displayed. They are arranged with the most specific at the top to the most general at the bottom. You can select one or more items in the list, and then press CTRL+C to copy them to the clipboard.
In our case, the Sierra Wireless MC8755 Device gave us USB\VID_1199&PID_6802&REV_0001 as the most specific value and USB\VID_1199&PID_6802 as the least specific, so we made a note of these before continuing.
Next, we downloaded the Sierra Wireless MC87xx 3G Watcher .MSI package from our notebook OEM support site. Sierra Wireless have instructions for performing a silent install of the 3G Watcher package, so we used those to understand the installation command we would need to use.
So, we had a unique ID for targeting, the installation package, and the installation command line we would need to use. Now we needed to configure MDT to deploy it. First, we create a New Application.
- In the MDT 2010 Deployment Workbench console tree, right-click Applications, and click New Application
- On the Application Type page, click Next to install an application and copy its source files to the deployment share
- On the Details page, type the application’s name in the Application Name box, and click Next
- On the Source page, type the path or browse to the folder containing the application’s source files, and click Next
- On the Destination page, click Next to use the default name for the application in the deployment share
- On the Command Details page, type the command you want to use to install the application, and click Next. We used the following
msiexec.exe /i 3GWatcher.msi /qn
- On the Summary page, review the application’s details, and click Next
- On the Confirmation page, click Finish to close the New Application Wizard.
Next we modify the Task Sequence and create our query.
- In the MDT 2010 Deployment Workbench console tree, click Task Sequences
- In the details pane, right-click the name of the Task Sequence you want to add the Application to, and then click Properties
- In the Task Sequence Properties dialog box, click the Task Sequence tab
- Expand State Restore and click on Install Applications
- Click the Add button, and select General, then Install Application
- On the Properties tab for Install Application, type the application’s name in the Name box, and click the Options tab
- On the Options tab, click the Add button and select If statement
- On the Source page, type the path or browse to the folder containing the application’s source files, and click Next
- In the If Statement Properties dialog box, ensure All Conditions is selected and click OK
- On the Options tab, click the Add button and select Query WMI
This is where we’ll now use a WMI query that will provide our Hardware Specific Application Targeting. You’ll need to modify this for your particular hardware, but we previously discovered that our least specific Device ID value was USB\VID_1199&PID_6802 so we will use this to help form our query.
- In the Task Sequence WMI Condition dialog box, ensure the WMI namespace is root\cimv2 and type the following in the WQI Query text box, clicking OK when finished:
SELECT * FROM Win32_PNPEntity WHERE DeviceID LIKE '%VID_1199&PID_6802%'
- Click OK to exit the Task Sequences dialog box
And that’s it. When you deploy a computer using the modified Task Sequence, the WMI query will run and, if matched, install the application. If a match can’t be found, the application won’t be installed. Hardware Specific Application Targeting in a nutshell.
One thought on “Hardware specific application targeting with MDT 2010”