Microsoft Windows XP Embedded Technical Frequently Asked Questions

 

Andy Allred and Jon Fincher
Microsoft Corporation

November 2002

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

Summary: This document answers common technical questions about the Microsoft Windows XP Embedded operating system.

Contents

General
First Boot Agent (FBA)/Utilities Tips
Component Questions
Runtime Questions
Other Questions

General

What type of processors does Windows XP Embedded support?

Microsoft® Windows® XP Embedded supports all X86-based Intel processors including Intel x86 and Pentium, AMD K5/K6, Cyrix 5x86, and 6x86 CPUs.

Can I convert my Windows NT Embedded 4.0 configurations to Windows XP Embedded configurations?

No, you cannot convert an entire Microsoft Windows NT® Embedded version 4.0 configuration to a Windows XP Embedded configuration.

Can I convert the .kdf files that I created using Windows NT Embedded 4.0 into .sld files in Windows XP Embedded?

Yes, you can.

Is it easier to create components in Windows XP Embedded than it was in Windows NT Embedded?

Yes, Windows XP Embedded provides the ECONVERT tool, which is also capable of converting files and registry keys from .kdf format to .sld format.

How can I port an application written for Windows NT Embedded 4.0 to Windows XP Embedded?

Porting at the application level may involve a simple copy of the executable (.exe) file and its related files. At a more complex level, you may need to use Microsoft Visual Studio® tools to rewrite portions of the source code to accommodate different core operating system (OS) issues, such as the difference in registry keys and settings. You will need to use Windows Embedded Component Designer to define the application in an .sld file, so you can import it into the component database.

Are the Windows XP Embedded features fully compatible with Windows XP?

Yes, Windows XP Embedded contains the exact same binary files as Windows XP.

Does Windows XP Embedded have the same features as Windows XP?

Yes, Windows XP Embedded is a fully componentized version of Windows XP Professional. Windows XP Embedded enables you to utilize your choice of Windows XP features in your reduced-footprint embedded designs. In addition, Windows XP Embedded provides embedded features to enable a broad range of device implementations.

Is Windows XP Embedded a real-time OS?

Windows XP Embedded satisfies the vast majority of performance requirements. However, if you require a more powerful real-time support for your Windows XP Embedded OS, you can utilize one of the real-time extensions that are available through third-party vendors.

Will Windows NT Embedded 4.0 continue to be supported?

Yes, Windows NT Embedded 4.0 will continue to be supported.

How does the licensing and pricing work for Windows XP Embedded?

For information on licensing and pricing, see the Web page, How to Buy.

How do I develop an application or driver for a Windows XP Embedded-based platform?

You can use the same application environment that you use for developing applications for the desktop. You can develop your application on a Windows NT 4.0 retail system and not use your embedded system to develop the application. Microsoft Visual Studio offers a comprehensive environment for developing applications and drivers for Windows XP Embedded. Visit Microsoft Embedded Developer Network for information that provides the required documentation to develop applications and drivers for a Windows NT 4.0-based platform.

How do I add a component to my target OS?

Using Microsoft Component Designer, you can define a component in a manner that can be understood by the other Windows XP development tools. This component information is called a component object definition and has an .sld extension.

Components define their own functionality and their own build script. In a component object definition, component functionality is expressed as resources, properties, and optional build script that define how the component uses the resources. You define dependencies and conflicts for each component. You can also manage groups of components as one by assigning components to a group and then managing the group.

Using Component Designer, you save the component object definition in a carrier file, which is an Extensible Markup Language (XML) file that has an .sld extension. You can then import the component object definition into the component database.

Why are component object definitions important?

Component object definitions enable you to add any application, device or service that works on your platform to the component database. Using the Windows Embedded development tools, you can then add the application, device or service to your run-time image.

Component object definitions also ensure that the resources and dependencies for a component are selected appropriately. For example, pretend that you define two custom applications and import them into the component database. You create a standard configuration that contains neither of your applications. Next, you decide to create a run-time image using the standard configuration and one of the applications. When you add the application to the configuration, not only is the functionality of the application added, but the development tools are also alerted to the dependencies and build script for the application. This enables you to ensure that your configuration contains all the components that are required for a successful build.

First Boot Agent (FBA)/Utilities Tips

Let the First Boot Agent (FBA) run on disk when using Compact Flash as storage for your device.

When you are planning on using Compact Flash as your storage device for your image, it is recommended to first bring the image up on a hard drive and let the "First Boot Agent" run on the disk. The reason for this is that FBA does massive amounts of writing during the creation of the registry and has burned out a couple of devices on me. After the image is up and running after first boot you can then simply copy it to the device

What do I do if FBA reboots repeatedly?

If your FBA reboots repeatedly, this means that you built the runtime for the wrong partition. Target Designer defaults to C:\, so you must change the destination partition on the target machine. Check the beginning of the fbalog.txt located at .\windows\fba\fbalog.txt. If you see errors that say "invalid path", then this is the problem.

To fix it, within Target Designer, click Settings in the center pane. Then, select Target Device Settings. Your boot drive is probably correctly set to C:, but the Windows folder, Program Files folder, and Docs and Settings folder probably need to have their drive letter changed from C: to the correct letter. This will be the drive letter as indicated from RealMode (as if from fdisk run from Microsoft MS-DOS®). It's not always the same drive letter assigned by Windows.

Why am I getting an Exception Error during FBA?

This can be caused by the runtime being on the wrong partition of a system on which you are performing dual booting. Target Designer defaults to C:\, so you need to change the destination partition on the target machine. Check the beginning of the fbalog.txt located at .\windows\fba\fbalog.txt. If you see errors that read "invalid path", then the wrong partition was the problem.

How can I troubleshoot FBA errors myself?

First Boot Agent creates a log you can use for troubleshooting. It is located in the runtime at .\windows\FBA\FBALOG.txt. It lists every binary registered, protocols bound to the network interface card (NIC), Plug and Play (PnP) devices found, errors, and much more.

What should I check if FBA generates an Exception Error and I receive a Virtual Memory Error during FBA?

Your runtime has loaded more services and registered more binaries than you have physical random access memory (RAM) for on the target machine. You can either:

  • Reduce the number of features in the runtime by disabling or deleting components from your configuration.
  • Add pagefile support to the configuration (within Target Designer)—.
  • Add more RAM to the target machine.

Why does FBA take so long?

FBA performs services that Target Designer doesn't currently have the capacity for performing offline. This includes Plug and Play, Component Object Model (COM) registration, and security.

Why does my FBA log indicate "Invalid Path" Errors?

If your FBA log has "Invalid Path" statements in it, this is because you built the runtime for the wrong destination partition for the target machine. In Target Designer, you must provide to the tools the partition location for the runtime. Otherwise, FBA may try to process and register binaries located on your "safe build" of a different partition and ultimately generate an exception error.

Component Questions

How can I alter the default settings of a component?

Not all components can be altered, but some components have configurable settings allowing you to modify the component's default properties within Target Designer before building your runtime. For instance, in your configuration, examine the settings for your display driver component. You will see that you have the ability to preselect the runtime's resolution, refresh rate and color depth.

Where can I find a third-party driver not in the product?

The Windows Embedded tools allow you to easily create your own third-party driver components. For instance, in Component Designer you can "import" the driver's .inf file. Component Designer will then parse the .inf file's sections, and identify required registry keys and required binaries. Then you must create a repository to store the binaries in, import your new component into the database, and add it to your configuration with Target Designer. You can also use the command-line utility Econvert.exe to convert the .inf to an .sld file.

What is a macro component?

A macro component is simply a component that has only component dependencies and —no binary or registry dependencies are listed within that component. If you create your own components in Component Designer, select the Macro Component check box. When you import the resulting component in to your database, the display name will be bold.

What do I do if I'm having trouble finding components?

If you know the name or partial display name of the component, you can search Target Designer for this component. Don't forget that if the visibility of the component is less than your current setting (default is 1000), some components will be hidden from you. Simply reduce your visibility (for instance to 200), and you'll see an additional 200+ components.

If you do not know the name of the component but you do know the binary that makes up a desired feature, then you can use Filter Manager within Target Designer to locate the component that owns that binary.

When I try to install my legacy application I get the following message. Why?

16-bit Windows Subsystem
An installable Virtual Device Driver failed Dll initialization.
Choose 'Close' to terminate the application.

16-bit applications require Windows on Windows (WOW), so you must add the DOS Windows on Windows Support component to your configuration. You may need to reduce your visibility in Target Designer to 200 items to view the DOS Windows on Windows Support component.

What components are required to be in my configuration for Encrypted File System support?

NTFS and NTFS Format/Tools.

Runtime Questions

How can I automatically log on to the runtime?

Use the Automatic Logon component to automatically log on the user every time the system boots. This component has configurable settings allowing you to enter the default Domain Name, User Name, and Password. Keep in mind that if the user changes these values later within the runtime, the Autologon feature will fail.

How can I add a Pagefile to the runtime?

In Target Designer, locate the Hardware Abstraction Layer (HAL) component, for example Standard PC, in your configuration. Expand the tree for that component and select Settings. Edit the System Pagefile settings for Initial Size and Maximum Size. Also, select the Enable Pagefile support check box.

What shells are available for the runtime in Windows XP Embedded?

Within the database, there is the standard Explorer shell, the Task Manager shell, and the Command shell (cmd.exe). Explorer shell is preferable for your standard Windows shell experience. Command shell is usually used by very minimal configuration, usually along with the MinLogon.

I'm getting a "Missing pci.sys" error during the initial boot of the runtime. How can I avoid this?

If you receive a "missing pci.sys" error, you used TA.exe but the basic input/output system (BIOS) on the target machine returned information that could not be found in the database, so you wound up missing a critical device in the configuration. In this particular case, a Peripheral Component Interconnect (PCI) local bus component is missing from your configuration. Use TAP.exe, and this will be resolved.

How can I avoid the "Stop Error 6B" during the initial boot of the runtime?

If your runtime bug checks, or your operating system stops unexpectedly and an error message appears on a blue screen the first time you boot into it and it errors with bug check code 6B, this indicates that you omitted a necessary file system component. For instance, if you have satisfied your file system component requirement in Target Designer by adding the file allocation table (FAT) component, but the destination partition has NTFS, then you will receive this error. You will also see this error if you only added NTFS, but your system required FAT. There are four file system components in the database: FAT, NTFS, CDFS (for CDs) and UDFS (for DVDs). If you wish, you can add all four components. They will not conflict with each other.

Note:   The FAT component is for FAT16 and FAT32.

How can I avoid the "Stop Error 7B" during the initial boot of the runtime?

If your runtime bug checks, or your operating system stops unexpectedly and an error message appears on a blue screen the first time you boot into it and it errors with bug check code 7B, this indicates that you omitted a critical boot device. This boot device could include one of the following components: a disk drive, an integrated development environment (IDE) controller, a primary IDE channel, a secondary IDE channel, a PCI bus or another boot device.

The two most common causes:

  1. You built the hardware configuration without using the tools to query the target machine for its devices.
  2. You used ta.exe in the BIOS on the target machine, but it returned information that could not be found in the database. This means you could have missed a critical device in the configuration process. If you know the specific component or one that is compatible, such as a generic driver that is in the database, try adding one of these components into your configuration and build the runtime again.

Try one of the following solutions:

  • Use tap.exe instead of ta.exe. Using tap can be virtually foolproof, and it will determine all devices necessary. You can only run tap from Windows 2000 or Windows XP. Tap will query the registry to identify the correct devices that Windows Setup determined would be best for that machine. Another downside to tap is that it will pull in any devices that it used to install in that machine but were subsequently removed, and it may pull in some software-enumerated devices into your configuration that you may not want or need. If this happens, delete the unnecessary component from your configuration.
  • The second solution would be to examine device manager in a safe build successfully installed on the target machine. For instance, if you already have Windows XP or Windows 2000 installed, open device manager and identify the critical device listed in Device Manager that is missing from your configuration in Target Designer. Then, locate the device with the same display name in Target Designer and add it to your configuration.

How do I clone the runtime to multiple target devices?

Windows XP Embedded includes the System Cloning Tool component. Adding this component to the configuration will add steps to the First Boot Agent (FBA) process not normally seen. After the system completes FBA phases 0–8,500 the system reboots on your Master system and enters the "Reseal" phase 8,501–12,000. After the Reseal phase, you must shut down the system and copy this image to disk. Propagate this image to the multiple cloned machines. The next time this image boots, the cloning phase begins and the computer's security identifier (SID) from the master device is replaced with a unique SID. For more information, see the Help files in XPEHELP.chm: System Design Guide | Design Considerations | Cloning

Note:   Refer to XPEHELP.chm on special settings required if you need FBA to process anything after cloning. For more information, see the "Phase (integer)" explanation of the Help file located at System Design Guide | Appendix Info | Custom Resources | FBA Generic Command.

How can I correctly set the partition size to avoid the error: "A Problem is Preventing Windows from Accurately Checking the License for this Computer - 0x80090006"?

If, when logging into the runtime, you receive the error "A problem is preventing Windows from accurately checking the license for this computer. Error Code: 0x80090006", then this indicates you did not correctly set the partition size in Target Designer. Within Target Designer, you must provide to the tools the size of your destination partition. If it's grossly incorrect, then the runtime will fail. The default setting is for 1024 MB. To change this, click Settings of your configuration in the center pane of Target Designer. Then, select Target Device Settings and locate the Boot Partition size configurable setting. Change this value to the true partition size on which the runtime will reside.

Important:   Re-run check dependency before rebuilding the runtime.

How can I enable context menus for "right-click" functionality in the runtime?

Context menus are disabled by default. To enable them, you must change the configurable settings in the User Interface Core component. There are two check boxes related to context menus that you can modify.

How can I reduce the footprint size of a Windows XP Embedded runtime?

If you are trying to reduce the runtime image footprint size, here a few things you may want to try:

  • Disable pagefile support. If you have enough RAM to support the services you expect the user to run, then you may not need the pagefile. Note that pagefile is disabled by default anyway.
  • In the configuration, disable or delete any hardware components you do not need. These driver components may have component dependencies, which in turn may have additional dependencies and so on. So, having one unneeded driver component in the configuration may have an impact (sometimes a huge impact) on your resulting footprint.
  • If you used TAP.exe to generate the hardware configuration, please see the Disabling Software Enumerated Devices Picked up by TAP.exe tip. These can have a significant impact on your footprint if you are not careful.
  • Convert the partition on your target machine to NTFS, and then compress the volume (the compression feature requires NTFS file system). This can reduce the footprint by sometimes up to 40 percent or more. Don't forget that this requires you to add the NTFS component to the runtime.

How can I deploy a Windows XP Embedded runtime?

Deploying a Windows XP Embedded runtime to your device can be fairly simple, but here are few tips to help you avoid the pitfalls. For clarity, "deploying an image" is used to mean moving the runtime image to the device and booting the runtime on that device; and for simplicity, a standard integrated device electronics (IDE) hard drive is used as the boot media. There are a few things to remember when deploying the image.

These are some easy things to check on your own:

  • Make sure that the partition you're booting from is formatted FAT or FAT32.
  • Make sure that the partition is active (use FDISK to verify or change this).
  • Make sure that the boot partition (usually the C:, or the first partition on the first hard drive) has a valid Windows XP boot sector.
  • Make sure that the boot partition has the necessary Windows XP boot files (these are NTLDR, NTDETECT.COM and BOOT.INI).
  • Make sure that the BOOT.INI has the proper ARC path pointing to the location of the system files.
  • Make sure that the system files are where you said they'd be in the form they need to be.
  • Make sure that the configuration knows where to put the files.
  • Make sure that the system contains the necessary drivers to support booting.

The first two are rather easy to check on your own, but they cause some problems if you're not thinking of them.

You can put a valid Windows XP boot sector on your boot drive using the BOOTPREP.EXE utility shipped with Windows XP Embedded Beta 2. It should be located in the \Program Files\Windows Embedded\utilities folder. If it's not there, double-click Add/Remove Programs in Control Panel to modify your Windows XP Embedded Client Tools installation and select the Boot Preparation utilities. There is a README associated with the tool that gives full usage information and some typical usage scenarios.

If you do not properly specify the boot ARC path during build, the BOOT.INI will not have the proper path to your system. Information on ARC pathing won't be repeated here. For more information on how to properly construct ARC paths, query the KB or MSDN BOOT.INI or ARC paths.

Obviously, if the ARC path is correct, then the system files better be there—you need to ensure that long filename (LFN) conversion to MS-DOS 8.3 names doesn't happen. There are Microsoft and third-party tools to help you preserve LFNs when copying using operating systems that don't support them. The best way to effect a copy is to install the embedded system in the development machine, then copy the files over in the native Windows 2000 or Windows XP operating system. You can also copy them over a network. There are also third-party tools to enable LFN network copying on devices that are floppy booted.

Of course, you must make sure the system files have the proper components to support booting. The easiest way to ensure this is to use TAP.EXE to discover the hardware on your machine. However, if you must run TA.EXE, or are adding components by hand, you may be missing crucial components. The list of components necessary varies from machine to machine, but the minimum you need are a BIOS component (Standard PC, for example —found under Hardware:Computers in Target Designer) an IDE controller (specific to your hardware), the Primary IDE Channel and Secondary IDE Channel components, and the Disk Drive component. This last one is tricky, as there are three Disk Drive components in the Windows XP Embedded database. Inspect the Properties of each component, and look at the Advanced Properties. You want the component with the "cmiPnPDevID" property value of "GenDisk".

You also must ensure that you set the target drive properties in the configuration to point to the proper locations. Select the configuration (top node in the Configuration Editor tree), and then click Advanced in the Details pane. There are four properties to set:

CmiTargetBootDrive Where the system will boot from (usually C:)
CmiTargetWinDir Where the \Windows folder will be located
CmiTargetProgramFiles Where the \Program Files folder will be located
CmiTargetDocsAndSettings Where the \Documents and Setting folder will be located

If these are not set properly before building your image, you will have problems booting and problems during the First Boot Agent sequence.

If you are booting from one partition (say C:) but running the system from another (say D:), your runtime image on the development machine will have a DriveD folder containing the system files, while the root contains the necessary boot files. Make sure that the contents of these folders get copied to the correct drives.

Obviously, this might not solve for all boot issues, but running through these items should help you troubleshoot boot problems more quickly.

Other Questions

How can I remove the Windows splash screen after POST?

Use the "/NOGUIBOOT" switch in your boot.ini. This will remove the Windows XP Embedded splash screen, the screen will remain blank until the shell loads or the user is prompted to log on to the system.

Example: In your boot.ini, your ARC path would look something like this:

multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Windows XP Embedded" /fastdetect /noguiboot

What is Bootprep?

Bootprep.exe is a command-line tool to create media that can boot into Windows XP Embedded. First, you must prepare the media by using MS-DOS tools such as FORMAT and FDISK to prepare the MBR (Master Boot Record) and at least one partition. This program prepares your media, the active partition of which has been formatted and made bootable with either FAT16, BIGDOS FAT 16 or FAT32 for booting into Windows Embedded. The program replaces the partition boot sector code that would normally boot into DOS by loading IO.SYS and MSDOS.SYS with the code that loads NTLDR.

How can I disable the software-enumerated devices picked up by TAP.exe?

One of the downsides to using TAP.exe is that you get every device listed in the registry. This includes devices that used to be installed but have since been removed (like an old video card you may have upgraded from) and also includes software-enumerated devices. For instance, a lot of configurations will show wide area network (WAN) Miniport and Remote Access Service (RAS) asynchronous components. These were listed in the registry of your machine, but may not be needed for standard networking features to function properly in your runtime. Disabling or deleting them can result in huge savings of your footprint. To get the benefit, you must remove them from the configuration before you ever run through the check dependency phase.

How can I multi-boot a CEPC using NTLDR?

NTLDR can be used to multi-boot a Microsoft Windows CE–based personal computer between Windows NT®, Windows XP or MS-DOS, in addition to Windows CE without DOS boot loader. Just install Windows NT or Windows XP on a FAT16 boot partition on your Windows CE–based computer and then add a line within the BOOT.INI file to provide another choice for your 512-byte partition boot sector from which to boot from.

When NTLDR is installed, the current partition boot sector (typically track 0, side 1, sector 1) is saved to BOOTSECT.DOS and is replaced with its own boot sector that loads NTLDR, which in-turn calls NTDETECT.COM to continue booting into Windows NT or Windows XP.

NTLDR will use the default BOOTSECT.DOS file for the C:\ partition, but you can specify your own pathname (as done during the Windows NT install process). To make it appear as if NTLDR isn't there to bypass its prompt, just set timeout=0 in the BOOT.INI file.

You could also use the System Control Panel, Advanced Tab, Startup button to select a different default choice.

I have an application with multiple files that have the same name but reside in different folder paths. I can't place them in the same repository because the names are identical. How can I resolve this?

There's a short answer and a long answer. The short answer is to specify the source name and destination name of the binaries in your .sld file. For example, you would rename the binaries in the repository to 'windows_foo.dll' and 'windows_system32_foo.dll' (where "foo" is a generic placeholder for whatever name you choose). When the Target Designer builds the runtime, it will copy the correct files to the correct location and rename it to the correct file name on the fly.

The longer answer has two parts:

  1. Decorate the name of some of the files. For instance, if you have two binaries called foo.dll, one of which should exist in the windows\system32 folder and the other in the windows\drivers folder, then rename your binaries like this:
    • windows_system32_foo.dll
    • windows_drivers_foo.dll
  2. In your .sld file, author the component to place windows_drivers_foo.dll into the proper directory and rename the binary to foo.dll during the build process. You do this in the Add Component File Resource dialog box of the Component Designer. There you can specify the source name (for example, the file name in the repository—which would be "windows_drivers_foo.dll") and the destination name (for example, the file name when it resides in the proper folder of the runtime—which would be "foo.dll"). Target Designer will automatically rename the file to the proper name when it builds the runtime.

How can I make the security tab appear (like in Windows XP Pro) when opening "Sharing and Security . . . " from Explorer. What component might I be missing or not setting correctly?

You must include the Security Shell Extension component in your configuration. Note that for Windows XP Embedded, you also must manually register the "rshx32.dll" file. This has been fixed in Windows XP Embedded Service Pack 1.

© Microsoft Corporation. All rights reserved.