Customizing cabs for WM 5.0 deployment


I have always felt the need to customize my cab files so that they dont do things that is expected out of their normal behavior.
One such thing is to install using a cab to a predetermined folder and not letting it show in the add/remove list! This is helpful when you want to release hot fixes and you want to prevent deletion of your program dlls/database from the device when the update is made.

Using the following method, one can achieve this.

1) Create a setup project for mobile.
2) Build the project so that a setup.cab and setup.inf is emitted.
3) The main task is to edit this inf file and rebuild the cab using the command prompt.
The first few lines of the inf file look like this:
[Version]
Signature=”$Windows NT$”
Provider=”Company”
CESignature=”$Windows CE$”

[CEStrings]
AppName=”MyApp”
InstallDir=%CE1%\%AppName%
[Strings]
Manufacturer=”Company”

You now need to change ‘AppName’ to which ever folder or program name you would like to target on the device.
Once done, you need to use the cabwiz tool to emit the new cab.
>Cabwiz “pathToReleaseFolder/Setup.inf” /nouninstall

The cabwiz utility can be found in Microsoft Visual Studio 8\SmartDevices\SDK\SDKTools.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: