Windows XP Embedded USB starting point

Windows XP Embedded is a modular version of Windows XP Pro that comes with specific tools to create the OS, and Embedded features that enable scenarios specific to the Embedded area. So the first thing you have to do to build a first Windows XP Embedded is to get the list of peripherals installed on the hardware you are targeting. This can be done using a tool called Target Analyzer. This tool can be run from DOS, Windows or WinPE.

OK, here we are with a virgin hardware (no OS, no DOS, and HD or Flash not even formatted), no floppy disk reader (that could have been useful to boot a DOS from a floppy and run the Target Analyzer tool from there).

Let me suggest a couple of solutions to start working on XPe. Most of the recent hardware (embedded or not embedded) have a BIOS that is compatible with USB boot. That means you can plan to work with a USB Disk on Key to boot "something" in order to prepare and analyze the hardware.

  • The first solution would be to use WinPE. WinPE is the Pre-install environment that boots when you install Windows from a bootable CD or DVD. It allows you to run utilities such as Diskpart. Here are the steps to prepare a WinPE bootable disk on key
    • Find a USB Disk on Key (at least 512MB)
    • Prepare the USB media :
      • On Windows XP, use the command line tool ufdprep.exe that is located in the folder Program Files\Windows Embedded\Utilities
      • On Windows Vista, run a Command Prompt, then type the following commands:
        • diskpart
        • list disk (find your DOK in the disk list)
        • select disk # (where # is the number of the disk you read previously)
        • clean
        • create partition primary
        • select partition 1
        • active
        • format fs=fat32
        • assign
        • exit
      • Download and install the Windows Automated Installation Kit
      • In the menu Start|All Programs|Microsoft Windows AIK, start "Windows PE Tools Command Prompt"
      • in this command prompt, run copype.cmd x86 c:\winpe_x86
      • customize the c:\winpe_x86 folder with the tools you'll need (I added diskpart from C:\Windows\system32, and tap.exe from Program Files\Windows Embedded\Utilities)
      • type xcopy c:\winpe_x86\iso\*.* /s /e /f e:\ (where c:\ and e: represent where the WinPE files are located and USB flash drive respectively).
    • Insert your disk on key in the target
    • Boot the target and enter BIOS settings to enable USB boot
    • WinPE boots and is charged in RAM
    • you can now run diskpart to prepare your media (flash or HDD) and tap to retrieve the hardware peripherals list into a devices.pmq file that will be imported in Target Designer (or Component Designer) to build your Windows XP Embedded OS for the target.
  • the second solution would be to build a minimal universal Windows XP Embedded that will boot from the USB disk on key. Here are the steps
    • Ensure you have XPe Feature Pack 2007 installed
    • Launch Target Designer
    • select File|New
    • Name the project whatever
    • add these features
      • Software|Test & Development|WinLogon Sample Macro
      • Software|Test & Development|Class Installers / Hardware Compatibility
      • Software|System|System Services|Base|USB Boot 2.0
      • Software|System|Storage & File Systems|Disk Management Command Line Utility
      • Software|System|System Services|Base|CMD - Windows Command Processor
      • if you want to use your mouse, add the relevant support (PS2, USB), note that keyboard will be available.
    • Check dependencies and resolve errors (select EWF versions for FAT and NTFS when proposed)
    • Build
    • Copy the image (default location is C:\Windows Embedded Images) to the disk on key
    • add tap.exe from C:\Windows\System32 to the disk on key too
    • plug the DOK and boot XPe
    • After First Boot Agent is finished, you will be able to use tap.exe to retrieve the devices.pmq file listing the hardware peripherals embedded on the target and to prepare the embedded media using the disk management command line utility : diskpart.