Reconstructing WEC7 web updates for offline installation

[UPDATE: This issue has been resolved through the "Offline Layout" feature]

Microsoft changed the update mechanisms in the new version of Windows CE; Windows Embedded Compact 7. The update mechanism definitely needed an update, but in my humble opinion Microsoft made it worse instead of better...

We now have WEDU, the Windows Embedded Developer Update, a great idea if it would work. WEDU simply does not work inside a VMWare virtual machine and even if it works it always downloads the updates without a possibility to install from previously downloaded update packages.

That doesn't really matter if you have only 1 installation to keep updated, but what if you have multiple? Downloading gigabytes of data multiple times might not be time consuming or costing a lot of money in places where internet is fast and uncapped, but here in NZ internet is slow, expensive and capped so I really only want to download once and install often (see also this and this post).

If you have access to the Mobile & Embedded Communications Extranet (ECE) you can download most updates in img format, but unfortunately not all updates include all files needed and thus they are still web installers.

Luckily there are ways to reconstruct web installers so that you only have to download once and install (offline) often.

As an example we'll take the Windows Embedded Compact 7 Monthly Update July 2011:

  1. Download WindowsEmbeddedCompact7.exe
  2. Delete all subfolders under C:\Documents and Settings\All Users\Application Data\PkgCache
  3. Run the update
  4. When asked for a location for the files, click the box "Allow downloading for all files" and the click button "Download"
    NB: Everything from the OS, CTK and PB locations (see tree structure below) can be copied directly from the original WEC7 DVDs or you can point the installer to the DVD
  5. Once the download is finished you'll find the downloaded files in a GUID named subfolder of the PkgCache folder (full path above)
  6. Copy the downloaded files to a subfolder named "1" in the folder you placed WindowsEmbeddedCompact7.exe
  7. Continue the installation (NOTE: Do NOT exit the installation at any time before you have copied the files from the PkgCache folder! When you exit the update application ALL downloaded files will be deleted!)
  8. Repeat the steps above and increase the number of the subfolder you copy the files in for every component downloaded
  9. Once all components are downloaded and copied, exit the update application before it starts installing
  10. Restart the update application
  11. It will ask again for the missing files. Take note of the path it is showing in the box, for instance: [.]\OS\Common\Common.msi (for Architecture Common files)
  12. Rename the subfolder to match the expected location. So if you copied the common architecture update files into subfolder "4" you recreate the expected location (".\OS\Common") and move the files there
  13. Do this for all components and press OK
  14. The installer should then find the files and check if they are correct
  15. If all the files are in their correct places the installer does not show a download dialog anymore but instead will directly show a "Begin Install" window
  16. You can now run the installer for multiple (offline) installations

For reference, this is the entire directory tree required for offline installation of the July 2011 WEC7 update:

+---CTK (***)
+---OS (***)
|   +---Common
|   +---processor
|   |   +---ARMV5
|   |   +---ARMV6
|   |   +---ARMV7
|   |   +---MIPSII
|   |   +---MIPSII_FP
|   |   \---x86
|   \---sharedsource
+---PB (***)
|   \---Documentation
        |   +---armv5
        |   |   +---checked
        |   |   +---debug
        |   |   \---retail
        |   +---armv6
        |   |   +---checked
        |   |   +---debug
        |   |   \---retail
        |   +---armv7
        |   |   +---checked
        |   |   +---debug
        |   |   \---retail
        |   +---MIPSII
        |   |   +---checked
        |   |   +---debug
        |   |   \---retail
        |   +---MIPSII_FP
        |   |   +---checked
        |   |   +---debug
        |   |   \---retail
        |   \---X86
        |       +---checked
        |       +---debug
        |       \---retail

(***) This folder and all subfolders are copied from original WEC7 DVDs. You can also just point the installer to the DVD when asked for these files.