What’s New in Feature Pack 2007 for Windows XP Embedded

8/22/2007

Sean D. Liming and John R. Malin, www.sjjmicro.com

February 2007

Summary

Microsoft® Windows® XP Embedded is one of the most popular embedded operating systems available. Windows XP Embedded is being used in Point of Service, gaming systems, ATM machines, test equipment, control systems, office equipment, thin clients, and multimedia solutions. Windows XP Embedded SP2 Feature Pack 2007 builds on the Windows XP Embedded features, and adds some new capabilities and updates some old components. Here we will take a high-level look at the latest release.

Introduction

Command-line Tool – XPECON.WSF

USB 2.0 Boot

File Based Write Filter (FBWF)

Registry Filter

New Components and EEF Category

Component Changes

Footprint Reduction

Conclusion

Introduction

Feedback is an important part of any software development process. The more the same feature request comes back, the better the chance of it being in the final release. Feature Pack 2007 is a culmination of much of the feedback that the MVPs and developers have provided over the past four years. Many changes to components and some new embedded enabling features (EEF) are introduced. Here we will review the following features that will be part of Feature Pack 2007:

  • Development tools
  • USB 2.0 boot
  • File Base Write Filter (FBWF)
  • Component changes and/or updates
  • Footprint improvements: various components fixed to remove outdated component relationships
  • Several new components such as Microsoft SQL Server™ 2005 Express Edition, font and code page compatibility, and components for orphan files

Command-line Tool – XPECON.WSF

The biggest request over the past couple years is the need for a command-line utility that performs the same operations as Target Designer. The need comes from the idea that a build can be scripted directly from the version control system without having to manually open Target Designer and perform the build.

Xpecon.wsf is the new Windows Script File that allows you to perform the following:

  • Create a new configuration
  • Load a configuration
    • Example: xpecon> load cfg "c:\myimages/\image.slx"
  • Save a configuration
  • Search for components
    • Example (search for Internet Explorer®):

      xpecon> new myInst Instance
      xpecon> myInst = 'inst:^Internet Explorer'
      
  • Add components to a configuration
    • Example (add Internet Explorer to a configuration):

      xpecon> load cfg "c:\myimages/image.slx"
      xpecon> new myInst Instance
      xpecon> myInst = 'inst:^Internet Explorer'
      xpecon> cfg.Instances.Add myInst
      
  • Modify the properties of an instance of a component
  • Perform a dependency check and resolving dependencies
    • Example:

      xpecon> cfg.ResolveDependencies 2
      xpecon> cfg.CheckDependencies 2
      
  • Build a configuration
    • Example:

      xpecon> cfg.Build 0,"c:\images/myimage"
      

With XPECON, you can create script files that update and build images directly from the command line. Following is an example set of commands that I used for building an existing configuration:

C:\Program Files\Windows Embedded\bin\>xpecon
xpecon>dbopen seanht
xpecon>load cfg “f:\xpes\fp2007testc.slx”
xpecon>cfg.ResolveDependencies 2
xpecon>cfg.CheckDependencies 2
xpecon>cfg.Build 2, “g:\Windows Embedded Images”

Bb331822.d664a0c5-c3d3-4ae7-9ec8-1ef1abcf5960(en-US,WinEmbedded.5).jpg

Figure 1. Building an image from the command prompt

Instead of typing in each command manually, a response file can be created. Each line in the response file is a command line to be performed by XPECON. Following is an example, Myscript.rsp, for the preceding command-line entries:

dbopen seanht
Load cfg "f:\xpes\fp2007testc.slx"
cfg.ResolveDependencies 2
cfg.CheckDependencies 2
cfg.build 2, "g:\windows Embedded Images"
dbclose
quit

With a single response script file, you can perform the entire open, dependency check, and build with a single command line:

xpecon @myscript.rsp

Following are some important notes:

  1. There are two modes for running Windows scripts. Command mode must be set to run XPECON:

    cscript.exe //H:cscript
    
  2. cfg is a variable for the configuration file. The variable name could be anything, such as config, myslx, mycfg, and so on.

  3. The build directory must be empty before the build command, or the build will fail.

  4. Close the database when finished.

USB 2.0 Boot

Another highly requested feature is the ability to boot from USB 2.0 Flash disk. Booting from USB has not been technically possible. The problem has been that Windows XP/Windows XP Embedded does not support booting from a USB device. The UBS drivers load late in the boot cycle, thus the kernel does not have access to USB drives when it takes control during the boot process. There have been a few custom solutions to boot Windows XP Embedded from USB flash disks. These solutions require special hardware or special steps to get Windows XP Embedded to boot. Feature Pack 2007 introduces a new EEF called USB 2.0 boot, which officially adds Microsoft’s support. Most important USB 2.0 boot will support any USB 2.0 flash disk. Some system considerations need to be addressed:

  1. System must support USB 2.0 and USB 2.0 boot.
  2. In some cases, the BIOS needs to emulate the USB flash drive as a hard disk.
  3. USB 2.0 boot brings in dependencies that will conflict with the USB components from the chipset vendor. The chipset vendor’s components must be removed from the configuration.

The ability to boot from USB flash disk opens new possibilities for development deployment and field upgrade. For development deployment, a USB 2.0 Flash disk could hold an image that supports TCP/IP file sharing. The developer can boot to the USB flash disk, prepare and share the local hard disk on the network, and then transfer over a new Windows XP Embedded image. This would save a lot of time compared to the alternative Windows Preinstallation Environment (WinPE)/SDI solution currently offered. Field support staff can boot to a USB flash disk and copy log files, troubleshoot hardware, and upgrade whole images or a few files.

File Based Write Filter (FBWF)

The Enhanced Write Filter (EWF) is the most important and popular EEF that comes with Windows XP Embedded to date. EWF protects whole volumes or partitions from any writes. All writes to an EWF-protected partition are sent to an overlay. The overlay can either be Disk or RAM / RAM-REG. Booting from read only media, preserving the operating system, protecting from viruses or file corruption, or extending the life of a flash disk are the main examples for using EWF. The problem with EWF is that it is an all or nothing approach. If you want to save data, you would need a separate partition or disk drive that is unprotected.

The new File Based Write Filter (FBWF) takes a different approach by protecting on a file level instead of the whole volume or partition. The developer can set specific files or directories to be unprotected. Any writes made to protected files are sent to RAM overlay. Any writes to unprotected files are passed through to the disk. Figure 2 shows how FBWF interacts with the protect disk.

Bb331822.502229fc-f1e5-44bf-a4b8-7b2182ddb740(en-US,WinEmbedded.5).jpg

Figure 2. FBWF architecture

Now there are two filters from which to choose. EWF will protect an entire volume, where almost nothing can get through. FBWF will protect on a file level, where you can select the files you want to pass through. Both filters can be used to protect the OS on a flash disk, but FBWF will allow you to pass through write access so data can be stored. FBWF also offers an API set so you can control FBWF from within your own application. FBWF will be ideal for those using databases while still protecting the OS. When it comes to controlling files, FBWF is going be a popular feature.

Registry Filter

One of the problems with EWF was Domain secret keys and Terminal Services Client Access License (TSCAL) preservation. With EWF in place, the registry keys for these two items could be lost during a reboot, thus a failure to connect to the domain or loss of a TSCAL could occur. The Registry Filter was developed to preserve these two registry changes across reboots without requiring all registry changes in a file to be persisted. The Registry Filter is now available in Feature Pack 2007.

New Components and EEF Category

Several new components and categories have been added to Feature Pack 2007. A couple of components add support for orphan files that have been part of the repository, but did not have a component.

New EEFs Category Node in Target Designer

To help quickly locate EEFs, a new category has been added to the database and component browser: Embedded Enabling Features. This new category lists all the unique features (components) that are only found in Windows XP Embedded.

Bb331822.0e9f6cdd-d62b-4c4f-8b9f-762690968a82(en-US,WinEmbedded.5).jpg

Figure 3. New EEF category

Microsoft SQL Server 2005 Express Edition

There are many little support components required to run SQL Server Express Edition. This macro component adds only the support to install and run SQL Server Express Edition or Microsoft SQL Server 2000 Desktop Engine (MSDE). You must still download the appropriate database engine from the Download Center on microsoft.com separately.

Font and Codepage Application Compatibility Components

These two new components have been added to support the look and feel issues that have occurred in various control panels and dialog applications.

  • Fonts Application Compatibility: Adds all English fonts that are in the default install of the dependency database. However, this does not include font components normally installed from separate Windows XP Embedded MUI packages. It also does not include any non-English font in the default database.
  • Codepage Application Compatibility: Adds all Codepage components that are in the default install of the dependency database.

Additional Locales and Keyboard Layouts

Additional keyboard layout components have been created to address certain locales. Bug fixes have also been done in some other keyboard layout components. The following table contains a list of keyboard layout components that have been added or modified.

Keyboard layout Description

Keyboard: Bosnian

New component

Keyboard: Finnish with Sami

New component

Keyboard: Swedish with Sami

Corrected display name registry key

Keyboard: Norwegian with Sami

Added as component dependency to Norwegian Language Support component

Keyboard: Sami Extended Norway

Added as component dependency to Norwegian Language Support component

Keyboard: Spanish

Added as component dependency to Spanish Language Support component

Keyboard: Spanish Variation

Added as component dependency to Spanish Language Support component

Microsoft DirectShow Indeo Codecs

The Indeo codec components were readded to the database to maintain parity with Windows XP Professional. This includes the following new components:

  • DirectShow® Indeo3
  • DirectShow Indeo4
  • DirectShow Indeo5
  • DirectShow Indeo5Audio

Previously Orphaned File: Cacls.exe

Cacls.exe is now owned by the Primitive: Cacls.exe component. This feature is a command-line tool to control the Account Control Lists (ACLs).

Previously Orphaned File: Gpupdate.exe

Gpupdate.exe is now owned by the Group Policy Refresh Utility component. This is a command-line utility to manually update any changes that are made to group policies (some changes can be made immediately).

Component Changes

Many components offer customization settings within a configuration, but locating these settings have been a little inconsistent. Some components were using the expected Setting page and others had settings buried in the Advanced properties dialog box. Feature Pack 2007 corrects these inconsistencies and adds new features to some components.

EWF Configuration UI Setting Page Enhancements

The Enhanced Write Filter (EWF) component has had multiple changes made since it was released with the first version of XP Embedded. RAM-REG implementation solution, HORM, defragmentation issues are just a few changes that have been made along the way. The new EWF setting page features some updates to make configuring EWF easier:

  • The configurable options have been modified to make it more intuitive and robust.
  • An option to disable Background Disk Defragmentation has been added. By default, defragmentation is being disabled for your device to reduce the disk write activity, saving wear on the flash and saving overlay space.
  • RAM (Reg) has been added as an Overlay Type option.
  • An option for HORM has been added and the need to manually add the Resmany.dat file has been removed. You must still enable hibernation under the platform component in order to enable HORM.

The following figure shows the new EWF Configuration Settings page.

Bb331822.e8e4a7ed-7c22-42d8-b838-a9c38b5d6f89(en-US,WinEmbedded.5).jpg

Figure 4. EWF Configuration Settings page

User Account and Administrator Account

A much-needed update to the User Account and Administrator Account components has been made. Both now have a UI settings page that allows for easy set up of Passwords and other settings. Figure 5 shows the User Account Settings page.

Bb331822.4afe892e-4fc0-4926-8814-618b866d23f1(en-US,WinEmbedded.5).jpg

Figure 5. User Account Settings page

System Cloning Tool

The System Cloning Tool now includes a UI settings page that makes it easier set the various reseal options. In addition, there is a place for the custom DLL and entry point.

Bb331822.8ff83d21-c93a-43e8-baaa-64afebe8abdf(en-US,WinEmbedded.5).jpg

Figure 6. System Cloning Tool Settings page

Standard Start Menu Short Cuts Updated

The Standard Start Menu Short Cuts component was updated to reflect changes made in SP2, adding of new features, and deprecating of features from SP1 to SP2.

Dr. Watson Debugger Component

The Dr. Watson Debugger component has a new UI settings page to enable the debugger to be configured easier offline in Target Designer. The following figure shows the new configurable settings of this component.

Bb331822.c2561e6b-7e26-4b39-a405-0abb448793f1(en-US,WinEmbedded.5).jpg

Figure 7. Dr. Watson Debugger Settings page

Updated Windows Installer Service

The Windows Installer Service component has been updated to support the new Windows Installer version 3.1.

Component Descriptions for Primitives

All Primitive components now have some description. Previously there were many Primitive components with a blank description field in Target Designer. Adding these descriptions to the components enables the developer to make more intelligent decisions about feature components at design time.

Footprint Reduction

A major effort was made to fix some legacy component dependencies that brought in additional components that you might not want in a configuration. Internet Explorer and Microsoft Outlook® Express are two examples. Effort was made to reconfigure dependencies that were left over when going from one service pack to the next. Some dependencies among components existed to satisfy a registry dependency, so the registry keys can be moved to a new shared component on which the other components can depend. This removes the file dependency chain that previously was being caused.

Depending upon the features being selected (for example, Outlook Express), certain platform build scenarios are able to achieve a footprint reduction from 3 percent to 10 percent. For example, following is a comparison between Windows XP Embedded SP2 and Feature Pack 2007 using the following components:

  • Control Panel Applets – Custom component that has dependencies on many control panel applets
  • Registry Editor
  • Runtime Quick Start Helper Macro
  • Task Manager
  • User Interface Core
  • Virtual PC 2004
Windows XP Embedded SP2 (KB) Feature Pack 2007 (KB) Total size difference (KB) (%)

NTFS Compressed

171017

163134

7883 (4.61%)

Uncompressed

237524

226576

10948 (4.61%)

Internet Explorer Footprint Reduction

Many features in Windows depend on Internet Explorer, including the following features:

  • .NET Framework 1.1
  • Help and Support Services
  • HTML Rendering Engine
  • IMAPI - CD Burning
  • Internet Connection Wizard
  • Microsoft Vector Graphics Rendering (VML)
  • Outlook Express
  • Shell Namespace Extensions
  • SOAP Client Runtime
  • Windows .NET Messenger
  • Windows Media® Player 10.0
  • Windows Media Player 9.0
  • Windows Movie Maker

Those features either have a static or delay load dependency on one or more files out of the dozens of files owned by the Internet Explorer 6 component. Those dependent files were removed from the Internet Explorer component and are now “primitive” components.

Internet Explorer now depends on these primitives and other higher-level features such as the .NET Framework now also depend on just these primitives.

You can still have a fully functional Internet Explorer feature, but you now must explicitly add that feature to your runtime, otherwise you will only pick up one or a couple of the Internet Explorer individual file resources.

Bb331822.6a376da5-1fbb-4307-83dc-bfdcc7b6594d(en-US,WinEmbedded.5).jpg

Figure 8. Internet Explorer macro settings

Depending upon the features being selected (for example, Outlook Express), certain platform-build scenarios without a fully functional Internet Explorer feature may achieve a footprint reduction from 3 percent to 10 percent.

Footprint Reduction for SMS Client Scenarios

Remote Assistance Channel dependency on Help and Support was removed as an optional dependency. This can result in a footprint reduction of up to 30 MB for some devices with the SMS Client.

Conclusion

Feedback, Feedback, Feedback! Feature Pack 2007 adds a number of little updates and great new features that have been requested over the past couple years. FBWF and USB 2.0 boot are the two sure-hit features. The XPECON.WSF script file adds the long awaited command-line build that everyone has been looking for. The Setting page updates and footprint reduction round out the great new features that Feature Pack 2007 will provide.