Windows Administration

Why Windows XP Embedded Matters to You

Don Jones

 

At a Glance:

  • What's inside Windows XP Embedded
  • Special hardware options
  • Customizing Windows XP Embedded

Windows XP Embedded is the componentized version of Windows you often associate with consumer electronics devices such as set-top boxes or appliances. But Windows XP Embedded may have a place in your organization’s information technology lineup as well. While it may not be the best

solution for every one of your users, there are some specific scenarios where it offers lower administrative overhead, potentially less-expensive and smaller hardware, and greater security.

What is Windows XP Embedded?

Windows® XP Embedded is one of three small-footprint versions of Windows, along with Windows Embedded CE and Win­dows Embedded for Point of Service. Of the embedded Windows operating systems, only Windows XP Embedded offers the full functionality—or at least the potential for full functionality—of a Windows XP Pro­fes­sional client computer. It’s based on Win­dows XP Professional Service Pack 2 (SP2); however, Windows XP Embedded is different from the regular Windows XP in its extreme level of modularization. Windows XP Em­bed­ded doesn’t have what you might call a standard installation image. Instead, you use a toolkit called the Windows Embedded Studio to create a customized Windows XP Embed­ded environment for whatever device you’re building, and that environment includes only the functionality your device will need. If you don’t need DirectX® or Windows Ex­plorer, then simply don’t install them. This modularization means that each Windows XP Embedded image you build and deploy will have fewer moving parts, so to speak, which means less administrative effort and greater security, as well as the ability to run on lower-cost hardware. Some of the options available can be seen in the Target Designer (part of the Windows Embedded Studio), as shown in Figure 1.

Figure 1 Selecting components in Target Designer

Figure 1** Selecting components in Target Designer **(Click the image for a larger view)

A Place in the Enterprise

A growing number of user scenarios are ideal for a Windows XP Embedded-based device. For example, consider companies that maintain large customer service call centers. In many cases, call center representatives need one or two internally developed applications and perhaps a Web browser. They’re only using a fraction of their computer’s capabilities, so Windows XP Embedded lets you trim down those capabilities to just what’s needed. Less functionality means that less surface area is exposed to mistakes or possible security attacks.

Because Windows XP Embedded devices have limited functionality, they can be run on less-powerful, often less-expensive hardware. A number of manufacturers, produce motherboards that use low-power, Intel-compatible processors. These motherboards are extremely small, use very little power, and often don’t even use a fan since they run so cool. They work quite well for a small-footprint, embedded device capable of running only a limited set of applications.

The Special Superpowers of Windows XP Embedded

Windows XP Embedded offers some very valuable options that aren’t available in the full version of Windows XP. Enhanced Write Filter (EWF) and Hibernate Once, Resume Many (HORM) both can simplify your Windows administration tasks. EWF is an optional component you can add into a Windows XP Embedded deployment that makes a given disk volume read-only. Any write activity directed to the disk is diverted to an overlay, which can be located on another disk or even in memory. The operating system itself views the EWF overlay and its parent volume as a single unit, meaning it looks just like a normal disk volume. Behind the scenes, however, the parent volume isn’t actually changing; changes are only made to the EWF overlay. There are a few ways this can be beneficial. Imagine deploying a Win­dows XP Embedded image to a Compact Flash (CF) card (Windows XP Embedded images can be as little as 5MB, and often check in at around 200MB, so CF would have plenty of storage). That CF card can plug into an adapter and connect to a motherboard’s IDE connector, making the CF card look like a normal fixed disk. Today’s CF cards have limited write capability (about 100,000 writes), so EWF would be used to make the CF volume read-only. Imagine putting the EWF overlay in RAM: if the user makes a mistake, just turn off the machine. The EWF overlay and any changes made to the machine are lost immediately. When you reboot, you’re back to the starting point stored on the CF card. You can use the same set-up for a CD- or DVD-based image; since those media types are inherently read-only, EWF captures any write activity to an overlay. Even if the overlay is stored on a small internal hard disk, you’re assured that the original boot volume (on CD or DVD) isn’t ever changed; if you need to reset the machine to its original configuration, simply wipe out the EWF overlay.

HORM, as the name implies, allows you to hibernate a machine one time and then resume from that hibernate point over and over again. The computer turns on almost instantly. Simply configure the computer and get all the needed applications running, and then hibernate it. From then on, each time you turn on the machine, you’ll only need to wait a few seconds to have everything up and running again.

Building a Windows XP Embedded Image

Microsoft has an Embedded Partner program consisting of companies that specialize in working with Windows XP Embedded (you can find lists of them on the Windows XP Embedded home page at microsoft.com/embedded). However, with just as many companies providing their normal PC manufacturers with prebuilt images (which include corporate applications and specific configurations), you might want to build your own Windows XP Embedded images that you can then share with an Embedded Partner who is providing you with complete, small-footprint systems. The Windows Embedded Studio, which installs on Windows XP Professional, can be used to build and manage Windows XP Embedded images.

To use the toolkit, first install the full version of Windows XP Pro on the hardware you plan to use for your Windows XP Embedded system. This lets you use the full Windows XP setup routine to get all the hardware working properly. Then, install the Windows Embedded Studio. This normally installs a database that’s used to manage embedded images but the database can actually be installed elsewhere, providing a central repository. Next, you’ll run a command-line utility called Tap.exe, which creates a special new component that can be used by Windows XP Embedded. Normally, components encapsulate functionality such as a media player, a file system, or other custom applications; in this case you’ll be creating a component that contains the hardware device drivers needed for your particular system. This step must be completed on the target hardware so that the tool can detect and include the appropriate hardware drivers.

In the next step, you run the Windows XP Embedded Component Designer and import the component package created by the Tap.exe utility. As shown in Figure 2, the Component Designer reads the device information and assembles a complete Win­dows XP Embedded component, which can become the basis for a new Windows XP Embedded image. This greatly simplifies the process determining exactly which device drivers a given platform will need. After creating the component, you use the Com­ponent Database Manager to import the new component into the Windows XP Em­bed­ded component database, a repository where all known Windows XP Embedded components are stored. Having the component in the database makes it available for use in Windows XP Embedded images.

Figure 2 Component Designer

Figure 2** Component Designer **(Click the image for a larger view)

Now you’re ready to begin creating a new target configuration, using the Windows XP Embedded Target Designer, the tool where most of your actual work will take place. As you saw in Figure 1, you’ll add whatever components you need to create the set of functions your device requires. You’ll also need to add some Windows core components, such as Windows Explorer (if your device requires a graphical shell), the NTFS file system (or FAT32), NT Loader, support for a language, the user interface core, and so on. More than ten thousand components are available by default.

You can also preconfigure each component’s settings. For example, the User Inter­face Core component can be customized to display specific items on the Windows Start menu, Desktop, and other locations. Custom­izing the settings for each component ensures that each device will be preconfigured to suit your needs (see Figure 3).

Figure 3 Customize settings

Figure 3** Customize settings **(Click the image for a larger view)

The trickiest part to a Windows XP Embed­ded image is the dependencies. For example, you can’t add a DirectX component to your image without also adding several components that provide Windows with its core graphics-handling capabilities. Keeping track of all the dependencies can become quite difficult, especially for larger, more complex images that may have literally thousands of dependencies. This is the job of the Compo­nent Database. Simply press F5 within the Target Designer and it’ll scan through every component you’ve added, automatically adding any dependencies your listed components require. Figure 4 shows the scan in progress; this is a critical step and is what allows Windows XP Embedded to be so highly modularized. Without this intelligence built into the Target Designer, it would be very difficult to successfully create images that contained all the correct dependencies.

Figure 4 Dependency check

Figure 4** Dependency check **(Click the image for a larger view)

When all of your components and their dependencies have been added, you can build your Windows XP Embedded image. Images are simply the files that need to be copied to the boot volume of your Windows XP Embedded device. You don’t need any special tools to deploy them (although the Windows XP Embedded toolset includes a remote boot server similar in functionality to Remote Installation Services; it permits deployment of Windows XP Embedded images to bare-metal hardware). After completing these steps, you can see how big your image actually is. I created a very basic image that included the Explorer shell and a few applications, such as Notepad and Paint, and created an image of less than 90 megabytes. Sure, you probably won’t find many users interested in a device that just runs Notepad and Paint, but it illustrates how small a task-specific image can be.

Windows XP Embedded vs. Windows XP

Windows XP Embedded isn’t at all a stripped down operating system option. Microsoft makes prepackaged components available that allow a computer running Windows XP Embedded to have much of the same functionality as a full version of Windows XP. This includes options to install DirectX 9.0c, the Microsoft® .NET Framework, Windows Media® Player 10, and more. You’ll also find plenty of developer documentation that describes how to build custom components, such as a custom shell to replace Explorer, allowing you to create a tailored environment for your specific Embedded device.

Windows XP Embedded does not, however, offer every single feature included in the full version of Windows XP Pro. For example, Windows File Protection (WFP) isn’t included in Windows XP Embedded; nor does it include some of the user-friendly features such as Windows XP Tour, the initial welcome screens and wizards that help a new user configure his computer, or Windows Setup. Windows XP Embedded doesn’t utilize Windows Product Activation (Windows XP Embedded images are activated by using a runtime product key from within the Windows Embedded Studio tools). Most notably, Windows XP Embedded doesn’t use Windows Update at all, although it can use a Microsoft Software Update Services server in your environment. Finally, Windows XP Embedded also lacks MSN® Explorer, which is included in Windows XP Pro.

Looking ahead, Windows XP Embedded continues a rich development cycle: Feature Pack 2007 is now available, adding new features such as USB-based boot, an enhancement to EWF that allows new files to be committed to the parent volume without committing the entire overlay, support for NTFS compression, and more. These enhancements continue to add flexibility and options to the Windows XP Embedded operating system, while bringing it more on par with the feature set in Windows XP Professional.

Going Embedded

Embedded systems may take a bit more work to build than a traditional Windows XP system, but they offer significant advantages in certain scenarios. Although reduced in functionality, Windows XP Embedded systems can support smaller, lower-powered hardware that’s easier to care for, easier to repair, and can cost significantly less. Lower power consumption also helps reduce utility bills and heat generation, allowing for more flexibility in designing compact workspaces. Aside from the expected uses for Windows XP Embedded—consumer devices, healthcare devices, kiosks, and other places where you might not even realize that Windows XP Embedded is under the hood, this embedded operating system may just have a place in your enterprise, too.

Don Jones is the Director of Projects and Services for SAPIEN Technologies and coauthor of Windows PowerShell: TFM (SAPIEN Press). Contact Don through his Web site at www.ScriptingAnswers.com.

© 2008 Microsoft Corporation and CMP Media, LLC. All rights reserved; reproduction in part or in whole without permission is prohibited.