Installing multiple CAB files with the same setup application

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:

Discuss

Discuss this article. Here you can write your comments and read comments of other developers.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值