Archive for October 2008
Deploying images
The easiest way to deploy an image (if you are not using a CF card which can be easily removed from the target device) is to use the Windows PE environment from Target Designer CD1. Using Windows PE you can deploy the image via a network share very easy.
Prequisits
Target Designer CD1
Network Share which contains your XP Embedded image
DHCP Server to assign an IP to WinPE
Deployment
Connect the target device to the same network as the development machine.
Boot Windows PE from Target Designer CD1.
Use ipconfig to check if you have received a valid IP address.
Map a network drive to the development machines share using the following command
net use N: \<IP of development machine> /User:domainusername
Enter the password if required.
Run diskpart to prepare the target disk.
To create a single primary partition on the first disk in the target disk use the following commands
SELECT DISK 0
CLEAN
CREATE PARTITION PRIMARY
ACTIVE
ASSIGN LETTER=C
EXIT
Format the previous created partition
format c: /fs:ntfs /q /y
Copy the image from the network share to the target device
xcopy N:*.* C: /H /E /Y /V /C
Reboot
Now you have successfully transfered the image from the development machine to the target device and it should boot correctly.
You can of course automate the commands from above by using a batchfile and a diskpart file. You can run diskpart with the /S parameter to specify a scriptfile.
Written by Wolfgang Unger
October 3, 2008 at 17:08
Posted in Windows XP Embedded
How-To use the Microsoft Image Difference Engine to update your XP Embedded image
The Image Difference Engine allows you to update your XP Embedded image without redoing it completly.
Scenario
You have created and deployed an XP Embedded image to your devices. There are several devices in the field and an application update needs an additional component, lets say the "Windows Media Player 11".
How does it work
Download the Image Difference Engine
If you have access to the Mobile and Embedded Communications Extranet you can download the tool from https://ece.partners.extranet.microsoft.com. If you are an OEM you can download the tool from the System Builder website (http://www.microsoft.com/oem/default.mspx).
Generating the source image
Open your original image in Target Designer.
Build the image without the Media Player component added.
Transfer the image to the target device and boot the device.
When FBA is done make a backup of the whole disk to the directory "C:XPe_source" on the development machine.
Generating the destination image
Then add the Media Player component to the configuration in Target Designer.
Run Dependency Check.
Build the image again.
Transfer the image again to the target device and boot it.
Let FBA finish and make again a full backup of the whole disk drive to the directory "C:XPe_dest" on the development machine.
Finding the difference between both image using IDIFF.EXE
Open a command prompt and navigate to the directory where you saved the Image Difference Engine.
Run IDIFF.EXE /source:C:XPe_source /dest:C:XPe_dest /output:C:XPe_diff
The Image Difference Engine will now analyze both images and extract the differences between both.
IDIFF.EXE will copy over all files that are different to the folder specified in the output parameter.
It will also create an IDIFFOUT.XML file which contains all files and registry entries that differ between the images.
The folder "C:XPe_diff" is the folder which you can use now to deploy your update to the devices in the field.
Deploying the updates using IDA.EXE
Boot your target device which should be updated.
Copy the Image Difference Engine files and the output folder to an USB stick and connect it to your target device.
Open a command prompt on the target device and run IDA.EXE /X:XPe_diffidiffout.xml /dest:C:
(Of couse you need to navigate to the correct IDA.exe path first)
The Image Difference Applier will now do all the changes which are saved in the idiffout.xml file. It will copy over the new files (and delete files which need to be removed), add, update and remove registry entries. When IDA finishes it will reboot the device.
Finished! You should now be able to use the Windows Media Player 11
Written by Wolfgang Unger
October 2, 2008 at 19:13
Posted in Windows XP Embedded
Creating custom components
XP Embedded Builder v2 allows you to create your own components very easily.
To create a component you just need to create the correct file structure, export your registry entries and build a configuration file.
I’ll show you how to build your component here and use the MsConfig component as example.
- Create a folder for your new component – in this case "MsConfig"
- Create a subfolder named Data in the component folder
- Now copy the files into the Data folder with the full path
Example:
MsConfig
|-Data
–|-Windows
—–|-PCHEALTH
——–|-helpctr
———–|-binaries <– place the file MsConifg.exe also in this folderIf you have your own application you can just copy and paste the whole folder structure into the data folder and you are fine. Just take care that you put it into the correct subfolders like "Windows", "Program Files", etc.
- Create a registry import
If you need to add registry data to run the application just export them to normal registry files (.reg – extension)
Open the exported file – you now need to split up the file according to the registry pathes.
You need a seperate file for HKLMSoftware, HKLMSystem, HKLMSecurity, HKLMSAM.
Create a seperate file for each of those path and replace the root pathes with ‘tmp’.For example:
[HKEY_LOCAL_MACHINESystemCurrentControlSet] with [HKEY_LOCAL_MACHINEtmpCurrentControlSet]
[HKEY_LOCAL_MACHINESoftwareMicrosoft] with [HKEY_LOCAL_MACHINEtmpMicrosoft]Save each individual reg file to the components folder under a seperate name.
Example for MsConfig:
Filename: reg_msconfig.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionApp PathsMSCONFIG.EXE]
@="C:\WINDOWS\PCHealth\HelpCtr\Binaries\MSConfig.exe"
New Filename: reg_sw.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINEtmpMicrosoftWindowsCurrentVersionApp PathsMSCONFIG.EXE]
@="C:\WINDOWS\PCHealth\HelpCtr\Binaries\MSConfig.exe"
5. Create a file named Config.cfg
Use the following sample as template to create your component configuration.
[Component]
Name=System Configuration – MsConfig
Version=1.0
Group=System Configuration
Order=1000
Autorun=FALSE
[Step_0]
Action=copy
Arg0=Data
Arg1=[InstallPartition][Step_1]
Action=reg
Arg0=Import
Arg1=[InstallWinDir]System32configSOFTWARE
Arg2=reg_sw.reg[Step_2]
Action=reg
Arg0=Import
Arg1=[InstallWinDir]System32configSOFTWARE.SAV
Arg2=reg_sw.reg
[Component]
Name=Displayname in the selection menu
Version=Version of the component -> older version get replaced by newer ones
Group=Name of the group in which the component will show up in the selection menu
Order=Installationorder (the higher the later)
Autorun=TRUE -> component will be launched automatically after baseimage installation
Action=copy <- tell XPeBuilder to copy files
Arg0=Data <- Source directory (relative to the pluginpath)
Arg1=[InstallPartition] <- Destination directory (see Tags)
[Step_x]
Action=reg <- tell XPeBuilder that a registry function will follow
Arg0=Import <- tell XPeBuilder to import a file into the registry
Arg1=[InstallWinDir]System32configSOFTWARE <- path to the registry hive which should be loaded
Arg2=reg_sw.reg <- path to the file which should be importet to the registry
[Dependencies]
DepX=Name of the component <- this creates a dependency to this component
[Conflicts]
ConX=Name of the component <- this creates a conflict between the components
Tags
Tags will be replaced with certain parameters specified during the installation – see list below
[InstallPartition]=Installation Partition (e.g.: C:)
[InstallWinDir]=Windows Directory of the installation (e.g.: C:Windows)
Integrating the component into XP Embedded Builder
- Create a folder named "Components" in the root of an USB drive.
- Copy the created component into this folder
- Connect the USB drive to the target machine and boot XPeBuilder
- The component will now appear in the component selection dialog
Written by Wolfgang Unger
October 2, 2008 at 18:24
Posted in XP Embedded Builder
XP Embedded Builder v2 – Overview
XP Embedded Builder is a tool which allows you to create your XP Embedded images directly on the target hardware without any knowledge in Target Designer.
The interface is like an XP Professional setup – you boot from DVD and a setup wizard will lead you through the installation.
At the beginning you can enter the product key to create a full version XP Embedded image.
You’ll get your product key together with your license package. If you leave the field blank, the XPeBuilder will create an 120-day evaluation version.
The next step allows you to prepare your target disk drive. You can create, delete and modify partitions to build the environment you need for your application. To easily prepare a whole disk drive you can just select the disk and click “Next” – the XP Embedded Builder will then create a single primary partition on the selected drive and will format it with NTFS filesystem.
After the preperation is done, the setup will copy a basic XP Embedded image to the destination drive. This is a small XP Embedded image which contains only basic functionality (footprint is lower than 100MB). This image is the base for all further customizations. From now on it’s up to you to select the components you wish to add to the XP Embedded image.
The XPeBuilder offers 50 components at the moment and there will be more available from time to time.
A component in XPeBuilder is more like a macro component in Target Designer because it already contains all needed files and dependencies.
Now you can specify a password for your administrator account. In the next setup screen you can create user accounts and give them the appropriate rights. You can even specify an automatic logon here.
The next setup screen will show you a list of all available components which are combined in groups.
To install a component just check it. If you click “Next” the XPeBuilder will check the dependencies of you selection and will add the missing components automatically. It will also check for conflicts and display you which components cannot be added together. If there is no conflict, XPeBuilder will begin with the component installation. Some components require further configuration – these components will display their own configuration windows.
For example the “Control Panel Items” component lets you select each control panel entry that should be added. The “Network” component will let you specify the computername and workgroup for the device. Or the “Language Pack” component lets you specify which language packs you want to install and lets you configure a default language.
After all components have been installed the XP Embedded Builder will do it’s final work and reboot the system.
Now the First Boot Agent will startup to finish the image configuration. When it’s done you can finish your XP Embedded image by installing additional driver, applications and so on as on XP Professional.
Written by Wolfgang Unger
October 2, 2008 at 13:29
Posted in XP Embedded Builder