Using the Image Difference Engine and Image Difference Applier tools (collectively, Image Diff), you can identify and package only the changed or added files and registry keys and upgrade in the field without having to redeploy a complete Windows XP Embedded with SP2 image. Image Diff also helps to determine and package smaller upgrades, including operating system security updates and hotfixes, configuration changes, third-party application updates, and line of business data.
First download th Image Difference Engine from the Mobile & Embedded Communication Extranet or the OEM System Builder website. For more information visit: http://msdn2.microsoft.com/en-us/embedded/aa731258.aspx
Create an update package using the Image Difference Engine
Load the source and destination operating system image on the development workstation.
For the purposes of this excercise we will use SDI image files that contain the source and destination runtime images. ImageDiff can perform all the necessary operations while the runtime image is offline. The “old_image” did not include the Notepad utility and the OEM Runtime Revision is 1.0. The “new_image” has the Notepad utility and the OEM Runtime Revision value is updated to 1.1. On the development workstation load the SDI files for the lab using SDILoader.1. Click Start -> All Programs -> Windows Embedded Studio -> SDILoader. If this is the first time that SDILoader has run you will be prompted to install the image device driver. Click OK to continue.
2. In SDILoader Click “Add Disk” and create a new SDI file named old_image.sdi. Click Yes to create the file. Make the SDI file the size of your target runtime image (or slightly larger).
3. In SDILoader Click “Add Disk” and create a new SDI file named new_image.sdi. Click Yes to create the file. Make the SDI file slightly larger than the target runtime image.
4. Use Diskmanager to partition and format the new disks. Format the disks with either NTFS or FAT32.
*Take note of the drive letters assigned to the SDI images. We will use x: to represent the old_image and y: to represent the new_image.
5. Copy the old runtime image files to X: and the new runtime image files (which are updated with Notepad.exe and an updated OEM Runtime Revision) to Y: Create the update package using IDIFF.exe.
On the development workstation open a command prompt, change directories to the location of IDIFF.exe and type: · IDIFF.exe /source:x: /dest:y: /output: C:\output The output files are saved in a directory named C:\output. Inspect the idiffout.xml file to verify the changes being made to the system.
On the development workstation open C:\output\idiffout.xml in Internet Explorer.
Some of the important information contained in the XML file:
<IDIFF-Registry> contains the new RunTimeOEMRev that will be applied to the device
<IDIFF-Files> contains the file notepad.exe that will be copied to c:\Windows\System32 on the device.
Use the Image Difference Applier (IDA.exe) to deploy the update package
On the development workstation open a command prompt change directories to the location of IDA.exe and type: IDA.EXE C:\output\idiffout.xml /dest:x: /noreboot The update should be successfully applied to the runtime image on x:\. Verifying the update was successfully applied
To verify the update was applied to the runtime image on x: first we verify that notepad.exe exists in x:\windows\system32, and then we check the SYSTEM registry hive offline to ensure the RunTimeOEMRev was updated to 1.1. 1. Verify the files were successfully updated. On the development workstation open X:\Windows\System32 and verify that notepad.exe is in the folder.2. Verify the registry was successfully updated. On the development workstation open regedit. You can open regedit by clicking Start -> Run and typing regedit in the run dialog box. In regedit:
-Click to highlight HKEY_LOCAL_MACHINE
-Click File -> Load Hive
-Browse to x:\Windows\System32\Config. Click SYSTEM then click Open.
-In the Load Hive dialog box type temp and click ok. A new subkey below HKEY_LOCAL_MACHINE appears and is named temp.
-Expand HKEY_LOCAL_MACHINE\temp\ControlSet001\Control\WindowsEmbedded. Click to highlight the RunTimeID subkey.
-In the right hand pane verify that the string value RunTimeOEMRev is 1.1.
-Important: Scroll up to the lab key again and click to highlight it. Click File -> Unload Hive. Choose yes to confirm the unload.