Click here to Skip to main content
13,453,774 members (44,217 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


1 bookmarked
Posted 28 Apr 2010

Windows CE and Mobile SetupDll with unzip support

, 28 Apr 2010
Rate this:
Please Sign up or sign in to vote.
Create Windows CE cab files which install a complete directory structure onto a device


Create Windows CE cab files which install a complete directory structure onto a device. I created this small tool as I needed an easy to use tool to create a pseudo installation cab.

The DLL will unzip an archive file with all dirs onto a device. To build a new cab, use the directory structure you will find below cabdir.

Create Your Own Install

First cleanup all files below cabdir\source. Then place all files into this directory as they should be unpacked onto the device. For example, for an application called barcodegame, I created the following structure below the source:

	+---Program Files
	¦   +---barcodegame
	¦       +---de
	¦       +---en
		+---Start Menu

Then let cabbuild.bat create a new archive with all files and then a cab with this packed file. For example, change to the cabdir (cd cabdir) and then launch:

Buildcab.bat "BarcodeGame3"

The batch file will patch an INF file needed for cabwiz and zip all files below the source. The batch will also patch the file SetupDll_zip2.ini.tmpl which is used to specify the install location and the zip filename:

;directory values have to end with a \


The unzip directory could also be controlled by the registry but the INI file is looked up first.

If you like to control the unzip by the registry, you have to change the template file “cabtemplate.inf” and use these settings:

	registry entries (all REG_SZ):
	unzipbasedir: "\"
	zipfilename: ""

Currently the batch and everything is adjusted to work with the INI template file “SetupDll_zip2.ini.tmpl”.


  • The INI and INF template files are patched using the GNU tool sed.
  • The zip file is created with 7za
  • The cab is created with the Microsoft SDK tool cabwiz.
  • The setupdll is written with the help of iniutil.cpp/h and unzip.cpp/h

Coding Techniques

  • Windows native API
  • CreateWindow from DLL
  • Read INI files on Windows CE
  • Unzip file on Windows Mobile
  • Update window from thread

Advantages and Disadvantages

  • No national windows support. No shellfolders :-(
  • Very easy to use 8-)
<!-- Social Bookmarks BEGIN --> <!-- Social Bookmarks END -->


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Germany Germany
No Biography provided

You may also be interested in...


Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03-2016 | 2.8.180318.3 | Last Updated 28 Apr 2010
Article Copyright 2010 by hjgode
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid