Configuring a Windows XP Embedded Thin Client


Configuring a Windows XP Embedded Thin Client

by Sean D. Liming & John R. Malin
SJJ Embedded Micro Solutions
April 2005
Applies to Microsoft® Windows® XP Embedded


This white paper provides an overview of the initial steps needed to customize a Windows XP Embedded run-time image for thin clients. It gives an overview of the hardware on the development system that is used in the run-time image's Hardware Abstraction Layer. It explains how to run Target Analyzer to create a Devices.pmq file that includes all the device drivers required to operate the target hardware. It describes how to use Component Designer to create a component definition (.sld) file that lists the hardware components for the run-time image. The white paper also explains how to add missing components to the .sld file, and how to customize the configuration by adding additional components. It lists several common components for thin clients, and how thin clients typically utilize them.



1.1 The Hardware Inside

1.2 Running Target Analyzer

1.3 Platform Macro Component and Missing Drivers

1.4 Configuring the Software

For More Information


Thin clients have become a very popular computing platform for IT departments. Thin clients offer the following advantages:

  • The ability to run an operating system with major applications such as word processing and spreadsheets, as well as other custom internal software, on remote servers. This saves companies millions in computing service fees.
  • The thin client architecture doesn't require extensive space on client systems, working like a window to the remote servers hosting the major applications. Client computers access these applications on the remote server, eliminating the need to install and update each client computer individually when an application changes.

No two IT departments are alike. Each department has its own approach to security and to customizing network access from client computers. For this reason, it's important to make thin clients as easy to configure as possible.

There have been several requests on the Windows XP Embedded newsgroups to modify Thin Client hardware or to make some change to the software. While the type of changes being requested varies greatly, many involve modifying the entire underlying operating system image.

You can make minor changes, such as TCP/IP addresses and domain name changes, within the existing image. However, extensive changes to the entire image require reverse engineering. This article discusses the first steps to take to customize Windows XP Embedded Thin Client platforms.

1.1 The Hardware Inside

A Windows XP Embedded image consists of the Hardware Abstraction Layer (HAL) and the software layer. The Hardware Abstraction Layer enables applications to interact with a hardware device using its device drivers. This lets the application interact with the device in a more general way than it would otherwise. The software layer contains the software used in the image, such as TCP/IP, Notepad, and Windows Explorer. The Windows XP Embedded database groups the operating system (OS) components into these two categories.

Every image includes device drivers that interact with hardware. Understanding hardware is helpful when you want to make changes to a Windows XP Embedded OS image.


The processor used by the thin client architecture affects its performance and footprint size. Many Thin Client terminals run either a VIA or Transmeta processor. Both are ideal for Thin Client hardware platforms because they use less power, offer strong performance, and do not require a cooling fan.

Flash Drives

Many Thin Clients use solid state, non-rotating technology, such as CompactFlash and mini-IDE flash drives, as their boot and storage medium. These drives make Thin Client systems a bit more robust then their larger PC counterparts.

The longevity of flash drives is an issue, though. Both Windows XP Pro and Windows XP Embedded constantly read from and write to a disk, resulting in numerous flash erase cycles. Because both CompactFlash and mini-IDE flash drives have a limited number of these cycles, they wear out more quickly than they would if used as they would in a normal commercial environment. Sophisticated wear leveling technology is needed to extend their use.

Thin Client OEMs implement Windows XP Embedded's Enhanced Write Filter (EWF) tool to prevent write actions (and, therefore, flash-erase cycles) to the flash drive. All write actions are instead re-directed to the RAM disk (also known as the overlay).

To make any changes to the OS, such as domain connectivity or a TCP/IP static address change, you can disable EWF to allow the update to occur, and then re-enable it.

The proper setup of EWF can be tricky, especially if you are using CompactFlash drives. When re-creating a Windows XP Embedded image for your Thin Client, be sure you are familiar with the setup of EWF.

Another drawback to these flash types is their relatively slow boot time. CompactFlash and mini-IDE flash devices boot with Port I/O mode at a rate of 3 to 5MB/s; as a result, a system could take as long as 90 seconds to boot. In contrast, an SATA hard drive uses DMA, which increases the access speed to 155 MB/s.

As an alternative, you could upgrade to M-System's uDiskOnChip (uDOC) if your target has an internal header for USB 2.0 and has BIOS support to boot USB 2.0 devices. The uDOC offers security, reliability, performance, and cost effective solutions for embedded systems. You don't have to worry about flash life, since the uDOC features M-System's TrueFFS® wear leveling technology. The boot times are just as fast as a hard drive, since the uDOC is operating over USB 2.0. The overall system performance will improve with the uDOC in your system.

Finally, you will need to be familiar with other devices on the platform such as the Ethernet, audio, and video controllers. You may have to create components for these devices if the drivers are not in the XPE database.

1.2 Running Target Analyzer

Creating a custom XP Embedded image implies that you must create a custom configuration in Target Designer. To get the baseline components for the target hardware configuration, you run Target Analyzer (Tap.exe) on the Thin Client system. The result is a PMQ file listing the hardware devices in the system.

Running Target Analyzer using Windows XP Embedded

If Windows XP Embedded is already running on the Thin Client, it should not be too difficult to run Tap.exe. At this point, understanding the hardware on the system becomes important, because you must install Target Analyzer on the Thin Client in order to run Tap.exe. There are several options:

  • Attach a Universal Serial Bus (USB) floppy drive or USB flash key to the Thin Client, and then run Tap.exe from it.
  • Copy Tap.exe directly to the internal storage media.

    Because EWF can interfere with copying Tap.exe, you can:

    1. Remove the Compact Flash or mini-IDE drive from the Thin Client.
    2. Use an adapter to connect the drive to your development system.
    3. Copy Tap.exe to the drive.
    4. Reinstall the drive on the Thin Client.
    5. Start the Thin Client.
    6. Run Tap.exe.

    You will also need to either copy the PMQ file that Tap.exe generates to the development machine or save the PMQ file to the media (bearing in mind the EWF issues discussed above).

  • Use a network share to download Tap.exe to the Thin Client, run it, and then have the PMQ file stored onto the network share.

Running Target Analyzer Using Another Operating System

Additional steps are required if you are upgrading your Thin Client to Windows XP Embedded from a different operating system. There are several alternatives:

  • You can use the MS-DOS version of Target Analyzer (Ta.exe). Because it doesn't produce all the components needed to develop a bootable image, you may need to add some of the following components to enable the image to boot:
    • PCI standard host CPU bridge
    • PCI standard ISA bridge
    • Plug and Play Software Device Enumerator
    • Primary IDE Channel
    • Secondary IDE Channel
    • Disk Drive
    • Standard Dual Channel PCI IDE Controller
    • Standard IDE/ESDI Hard Disk Controller
  • You may need to add additional components. Ideally, you want to install Windows XP Pro on the target system and then run Tap.exe under it. The resulting PMQ file will have the complete list of system components. However, limited local storage space may not allow you to install Windows XP Pro. In that case, you can build an image based on the MinLogon Sample Macro component to host Tap.exe:
    1. Open Target Designer.
    2. Create a new configuration and name it TAPrun.
    3. Add the MinLogon Sample Macro component to the configuration.
    4. Run a Dependency Check with Auto-resolve enabled.
    5. Build the run-time image.
    6. Once you have built the run-time image, copy Tap.exe to its root.

Because the final Windows XP Embedded run-time image uses the Standard PC HAL component, the image should run on all PC platforms that can run Windows XP. The run-time image's size is about 25MB. Download the image, with Tap.exe in its root, to the target device and let FBA run. Once FBA completes, you can run Tap.exe to create the PMQ file.

The resulting PMQ file will not have a complete list of components, but will have the critical components to boot the operating system. Use the steps in section 1.3 to import and create a design template.

The only drawback to this technique is that the .pmq file will contain the Standard PC component, rather than another possible Computer component such as ACPI. (Many systems today support the ACPI specification for power management and other BIOS features.) To get a list of the exact Computer components, run Ta.exe from DOS on the target device, import the resulting PMQ file, and then compare the Computer component results of the Ta.exe analysis under DOS to the Tap.exe analysis under MinLogon. The Ta.exe analysis will reveal the Computer component best suited for the system. If your hardware has ACPI support, you may have to replace the Standard PC component with the Advanced Computer and Power Interface or ACPI Uniprocessor PC components. You will also need to add any other missed components found by the Ta.exe analysis.

1.3 Platform Macro Component and Missing Drivers

Capturing the PMQ file with Tap.exe on the target system is the most challenging aspect of this process. The next step is to create a design template that contains the hardware components and basing line for the configuration.

1. Open Component Designer.

2. From the menu, select File->Import. This will bring-up the Choose File for Import dialog box.

3. In the file list, choose Devices.pmq and then choose Open.

4. The Import File dialog box appears. Enter a log file name such as \deviceMacro.log and choose Start. When completed, the dialog box lists the number of devices in the .pmq file and the number of drivers found for them. A new .sld file is created with a component titled devicesTAP.

5. In the details pane of the devicesTAP component, change the name of the component to XPES_target.

6. Next to the Prototype box in the details pane, choose Browse.

7. The Select Prototype Component dialog appears. Navigate the component tree to Software->Test & Development->Selector Prototype Component. Highlight the component and choose OK.

8. Right-click the Group Memberships node and choose Add Group Membership.

9. The Add Component Group Memberships dialog box appears. The logical place to put the platform is under Platforms. Expand the Hardware node, choose Platforms, and then choose OK.

10. Save the .sld file to the hard drive.

11. Open Component Database Manager and import the newly created .sld file into the database.

You will have to create custom components for any missing components, such as network, audio, or video devices. The deviceMacro.log file will list the names of the missing device components and their PCI IDs. Some hardware vendors will supply the device drivers on CD, but in general you will have to download these drivers from the chip manufacturer's Web site. Since the VIA and Transmeta processors are typically a two chip solution, finding the drivers should be straightforward.

In most cases, you can import the driver's .inf file into Component Designer to create the .sld file and component. However, some components may require more work with the help of the Component Helper, DependencyWalker, and FilMon/RegMon tools.

Once you have created the components and imported them into the database, you should edit the design template, adding the newly created hardware components as dependencies.

1.4 Configuring the Software

Now that the hardware layer is ready, the next step is the software customization of the image from within Platform Builder. You can mold the image to your specification since the configuration is being created from scratch. Some of the possible changes are:

  • Custom Shell - Instead of a stock shell such as Explorer, you can create a custom shell with its own look and feel, or create multiple shells for specific user types such as administrator and user.
  • Security Settings - Custom security settings can be added to lock users out of specific applications, directories, or drives.
  • Third Party Software – A number of companies have developed software for Thin Client solutions. Many of these companies have Windows XP Embedded components that can be imported into the Windows XP Embedded database.
  • Administration Support – The Thin Client should have some basic administration support components for networking, display, and other components.
ComponentThin Client Usage
Domain ParticipationBundles components which make it possible for an embedded device to participate in Windows domain security.
NetshellSets the TCP/IP settings for network adapters.

The Netshell command line utility is required to access the network settings in the network control panel.

TCP/IP UtilitiesContains a number if TCP/IP utilities including ipconfig.exe.
System Control PanelProvides the interface to change the Domain and computer name.
Display Control PanelChanges video resolution.
Date/Time Control PanelSets the local time zone, date, and time.
Audio Control PanelSupport systems with sound and audio.

Enhanced Write Filter (EWF) is both the most important and the most challenging feature to enable. You will need to implement EWF to protect the flash drive unless you are using the uDOC chip.

Mini-IDE flash drives shouldn't be a problem since they are IDE flash disks that are fixed devices. Many manufacturers set up EWF with a second partition as the EWF volume. You have your choice of EWF implementation and overlay type, since you're recreating the image from scratch. Since this is flash media, and Thin Client OEMs use EWF to redirect write actions (which limits flash-erase cycles on the flash drive) to the RAM disk, RAM or RAM-REG overlay types are the best choices.

Compact Flash (CF) cards are a different story. Because most off-the-shelf CF cards are identified as removable, rather than as a fixed device, setting up EWF on these CF cards can be difficult. Because both Windows XP and Windows XP Embedded will only view one partition on a removable media, you must choose RAM-REG as the overlay type. You can special-order CF cards that are identified as fixed devices from the manufacturer. The choice of using the RAM overlay with the second partition is possible. You may find that the Thin Client manufacturer has already configured the flash drive as fixed; if so, you just need to replace the image on the drive.

In addition to enabling EWF, you will also want to control it. By controlling EWF, updates and modifications to the image can be made within a working image. The EWF API can be used to add custom controls to shells or EWF administrator applications. Only Administrator accounts can access EWFMGR.EXE and the EWF API. Power User, User, and Guest accounts cannot change the state of EWF.

If you need to duplicate the image, you must add the System Cloning Tool component to the configuration and add a special reseal library to address EWF.

Once the configuration is completed and the image is built, the image will need to run FBA on the target system. The image will have to be copied to the target media in one of two ways: physically removing the device from the target system or using a software solution such as Remote Recover.

For More Information

The overview presented in this article gives you the basic tips to get started on configuring a Thin Client with a custom image. The real work is in the details. There are many solutions for working with Windows XP Embedded that can be found in a number of books, articles, and websites:

Windows XP Embedded Advanced, Sean D. Liming, RTC Books, 2003, ISBN:0-929392-77-9

Windows XP Embedded Supplemental Toolkit, Sean D. Liming, Cedar Hill Publishing, February 2005, ISBN: 1-932373-96-9. – XPe Center @ – contains various articles and links to different resources on Windows XP Embedded.

Attempts have been made to properly reference all copyrighted, registered, and trademarked material. All copyrighted, registered, and trademarked material remains the property of the respective owners.

The publisher, author, and reviewers make no warranty for the correctness or for the use of this information, and assume no liability for direct or indirect damages of any kind arising from the information contained herewith, technical interpretation or technical explanations, for typographical or printing errors, or for any subsequent changes in this article.

The publisher and author reserve the right to make changes in this publication without notice and without incurring any liability.