Applying QFEs with Windows XP Embedded Device Update Agent


John Macintyre
Microsoft Corporation

December 2002

Applies to:
    Microsoft® Windows® XP Embedded with Service Pack 1

Summary: Learn how to apply component quick fix engineering updates (QFEs) to deployed devices running Windows XP Embedded Service Pack 1. Included is a step-by-step approach for patching components using information posted with each system level definition (SLD) component QFE and Device Update Agent (DUA) scripting techniques. (7 printed pages)


Downloading Windows XP Embedded QFEs
Verifying the Registry
Applying a QFE to a Deployed Device


As part of the Microsoft® commitment to quality and security, there is an ongoing effort to ensure that critical fixes to the Microsoft Windows® operating system (OS) are made available to embedded customers. These fixes are released as updated SLD components, downloaded, and imported into the component database. The updated components are then available the next time you design and build a configuration or upgrade an older configuration.

Unlike Microsoft Windows XP Professional QFEs, component QFEs cannot be applied directly to deployed devices. To allow QFE updates, Windows XP Embedded with Service Pack 1 includes the DUA component. This service runs on your embedded device, allowing you to perform remote maintenance and administration tasks. Using DUA and the script translator, you can package QFE updates and target them for your device.

Downloading Windows XP Embedded QFEs

Each QFE provides enough information to author Device Update Programs targeted for your device. The Additional Information section of the QFE release notes contains the details of what has changed in the component. Use this information to update deployed systems with relevant binary and registry changes.

For this article, use QFE Q323759, released on August 22, 2002. It is a cumulative patch for Microsoft Internet Explorer.

Note   You should only apply QFEs to components that are in your deployed systems. The update detailed in this article is not a mechanism to add new components to a deployed device, devices that are protected by Enhanced Write Filter (EWF), or to offline images.

After downloading QFE Q323759, you must verify your registry configuration and then import the new component into your component database.

Verifying the Registry

It is important to know the configuration of the device you are updating, especially when you modify the registry. To better understand your configuration, examine the offline configuration of the device you are updating. Before you issue commands to update the registry, load the software hive of the offline image.

To load an offline hive

  1. Open the Registry Editor.

  2. From the registry tree, select either HKEY_USERS or HKEY_LOCAL_MACHINE.

  3. From the File menu, choose Load Hive.

  4. Navigate to the hive you want to load.

    Load the software hive that is located in your offline run-time image under \Windows\System32\Config.

  5. Click Open.

    The hive is loaded.

  6. In Key Name, type the name that you want to assign to the hive, and then click OK.

Examine the hive to ensure that the keys you want to set values for actually exist. If they do not exist, you must create these keys.

Applying a QFE to a Deployed Device

When you build your embedded run-time image, plan how you are going to service it before you deploy it. Including the DUA component in your configuration is a good way to begin.

To add the DUA component to the configuration

  1. Open Target Designer.
  2. Open or create a configuration.
  3. Add the Device Update Agent component.
  4. For purposes of this article, add the Internet Explorer component to your configuration. The QFE is applied to this component.

To configure DUA

  1. Select the Require HTTP Support check box.

    You need HTTP support to retrieve both the Device Update Program and QFE binaries from a remote Web server.

  2. Set the poll interval.

    This causes the device to poll for updates at a frequency specified by the interval. Polling only occurs when specified in the Poll Time/Day table.

    Note   For testing purposes, set the poll interval to a low value, such as 30 seconds.

  3. Clear the Poll Jitter check box.

    Generally, you use Poll Jitter when you do not want all devices to poll at the same time.

  4. In the Working Directory text box, enter the following directory:


    If c is not your system drive, modify the above path accordingly.

    You can specify any working directory and DUA creates it if it does not exist. This is the directory that DUA uses as a temporary store during command file execution.

  5. In the Select the Command Path Type options, select Remote using HTTP.

    This specifies that DUA polls for remote command files over HTTP. Therefore, a Web server is required to host your command files.

  6. Enter the host name that you are using to host the DUA command files.

    A protocol, such as HTTP, should not be specified here.

  7. In the Complete Path to the Command File including Filename and Extension text box, enter the following path to the update:


    This is the remote path DUA pulls for updates. Because this is a pull mechanism, an initial command file must be specified.

    Note   The previous steps indicate that you must set up a remote Web server that is configured with a Cmdfiles directory. Because you are not providing a user name and password, the site should be set up to allow anonymous browsing.

  8. Under Advanced Settings, change the protocol setting from the default value of HTTPS to HTTP.

You are now ready to build and deploy your run-time image.

Authoring the Device Update Program

A Device Update Program (.dup) file is a compiled DUA script (.dus) file. Use the binary and registry changes detailed in the Additional Information section of the QFE release notes to create a .dus file.

In QFE Q323759, the following binaries were updated:

  • Windows\System32\mshtml.dll
  • Windows\System32\shdoclc.dll
  • Windows\System32\shdocvw.dll
  • Windows\System32\url.dll
  • Windows\System32\urlmon.dll
  • Windows\System32\wininet.dll

In this article, you download the binaries from your Web server and then move them.

As you author the script, note the following:

  • Replace the myhostname value in the script with the name of your host.
  • The registry changes take effect as soon as the script executes. However, the files are moved only after the device is rebooted.

In a text editor, create a new file called Qfe01.dus and add the following script, which downloads and applies the QFE binary changes to the device.

// Retrieve the QFE binaries from the Web server.
// Edit myhostname to reflect your specific host.
// Move files when the device is rebooted.

From the additional information in the QFE release notes, you can see that registry values were updated under the following keys:

HKLM\Software\Microsoft\Active Setup\Installed Components\{61E6EAE5-7821-4AC1-9BBD-AED032A8E273}

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings

This article assumes that these keys already exist. If the keys do not exist in your configuration, see Device Update Agent in the product documentation for details on how to issue a REGCREATEKEY command.

To update the device registry with all the necessary QFE changes, append the following REGSETVALUE script after the HTTPGET and MOVEFILE commands that were just authored.

//Set the values for the QFE.
  Setup\Installed Components\{61E6EAE5-7821-4AC1-9BBD-

  Setup\Installed Components\{61E6EAE5-7821-4AC1-9BBD-

  Setup\Installed Components\{61E6EAE5-7821-4AC1-9BBD-

  Setup\Installed Components\{61E6EAE5-7821-4AC1-9BBD-

  Setup\Installed Components\{61E6EAE5-7821-4AC1-9BBD-

  CurrentVersion\Internet Settings,0,MinorVersion,

//Modify the poll location so the device does not execute this script 

Compiling the Script File

The DUA script compiler, Dusc.exe, is responsible for validating and tokenizing the scripts. The output of the script compiler is a Device Update Program .dup file that is used by DUA.

Dusc.exe is accessible from the Windows Embedded\bin directory. Navigate to the directory that contains Dusc.exe and compile the update script using the following command:

dusc c:\dua\qfe01.dus c:\dua\qfe01.dup

You can now deploy the QFE through your Web server.

Deploying the Device Update Program

  1. Deploy all the updated binaries to your Web server.

  2. Create a directory named Cmdfiles\Q323759 on your Web server root.

  3. From the QFE directory on your development machine, select and copy the following files to the Cmdfiles\Q323759 directory on your Web server:

    • Q323759_mshtml.dll
    • Q323759_shdoclc.dll
    • Q323759_shdocvw.dll
    • Q323759_url.dll
    • Q323759_urlmon.dll
    • Q323759_wininet.dll

    These files are downloaded as a result of Qfe01.dup.

  4. Deploy the Device Update Program to the Web server.

    Note   Your deployed devices are configured to poll for Cmdfiles\Qfe01.dup, so as soon as the .dup file is copied to the Web server, it is executed on the next poll interval.

  5. Copy the compiled script Qfe01.dup to the Cmdfiles directory on your Web server.

    Your devices are updated on the next DUA poll.

**Note   **It is very important to test .dup file deployments. Do not simply author updates and assume they work. Always test updates and only deploy to devices that are known configurations.

© Microsoft Corporation. All rights reserved.