Installing multiple CAB files with the same setup application
By Alexandru Balut, February 28, 2003.
Print version
Introduction
This articles describes how to create desktop installation program that installs multiple CAB files to Pocket PC using freeware NSIS.
Once you have the CAB file generated by cabwiz, and it's ini file, it is easy to make a setup application that displays a readme text and a licence, and installs it on the pocketpc; for example using EzSetup 2.0.
What You Need
Using NSIS
If you need to install, with only one setup application, two or more CAB files (for example a CAB file containing your Java application and a CAB containing the JVM), or if you need a setup application with extended functionality, you can use Nullsoft Install System - NSIS http://www.nullsoft.com/free/nsis. Both EzSetup and NSIS are freeware.
To use NSIS for making a setup application, you need a .nsi file. The nsi file included in the provided sample allows you to make a setup that installs two CAB files. It first displays a eula.txt; after the user agrees with it, it allows the user to deselect the installation of the second app. Then it copies the files and installs the CABs using CeAppMgr. At the end, it asks the user to open readme.html, using the default browser.
To install a CAB file on the pocketpc, for example YourApp.cab, the setup application has to start CeAppMgr.exe, passing as parameter the absolute path to the YourApp.ini file that is required by CeAppMgr.
To accomplish this, the setup application has to read the location of CeAppMgr.exe, from the registry:
ReadRegStr $1 HKEY_LOCAL_MACHINE "software/Microsoft/Windows/CurrentVersion/App Paths/CEAppMgr.exe" ""
Installing the CAB becomes as simple as:
StrCpy $0 "$INSTDIR/YourApp.ini" Call InstallCAB
where InstallCAB is:
Function InstallCAB ExecWait '"$1" "$0"' FunctionEnd
Sample
You can download a sample NSIS project for multiple CAB installation here - MultiCabInstallation.zip (200 Kb). To build the sample setup application, install NSIS, right-click on test.nsi, click Compile NSI.
Related resources:
- Section: Installation
- Article: Using EzSetup for creating Pocket PC installations
- Article: Using Spb AirSetup to create Pocket PC installers
- QA: How can I add my custom function to installation/uninstallation?
- QA: How to uninstall a Pocket PC application?
- QA: How can I create setup.exe file that will automatically install necessart .cab file on Pocket PC?
- QA: How to install a cab file on Pocket PC?
- Article: Successful Installation for Pocket PC Applications
- Article: Creating an Application Installation Package with Microsoft Windows CE 3.0
- Article: Deploying Windows CE applications with Wise InstallMaster
- Article: deVBuzz speaks with Jeff Law of PPCInstall
Discuss
Discuss this article. Here you can write your comments and read comments of other developers.