CAB Files for Delivering Windows Mobile Applications

4/19/2010

When you build a Smart Device application in Microsoft Visual Studio 2008, the output of the build process is an executable that will run on a Windows Mobile device. Before the application can be installed on the device, however, you must bundle the executable into a cabinet (.cab) file. You can create a .cab file by creating a Smart Device CAB Project, which requires no additional coding, that you can add to the existing Visual Studio Solution for your application. For information on how to create a .cab file for your application, see this Microsoft Web site.

Note

In Visual Studio 2008, files that are packaged into a .cab file to be installed on a device are stored by file name, without regard to their installation directory. For this reason, if multiple files within a .cab file have the same name but different install directories, only one of the files will be installed in all locations. To avoid this behavior, be sure to use unique names for all files within a single .cab file.

Delivery of Cabinet Files

The following offers several options to deliver your application to a Windows Mobile device.

Using the browser, you can manually copy a .cab file onto a device. In addition, ActiveSync is bundled with a utility called Application Manager. Using this utility, you can install the application contained in a .cab file onto a Windows Mobile device, and then write a desktop computer-based installer application that invokes the Application Manager to install applications on a cradled device. For more information about installing applications with the Application Manager, see The Application Manager.

An e-mail message or a Short Message Service (SMS) message can contain a link that the user clicks to download a file by means of Internet Explorer Mobile. Alternatively, an e-mail message can contain a .cab file that can be attached to an e-mail message. When the user runs the attachment, the file passes to the CAB Installer.

The operator can send Service Indication (SI) and Service Loading (SL) messages through a Push Proxy Gateway (PPG) to a Windows Mobile device. These special case Short Message Service (SMS) messages are placed in the user's Inbox. In the case of an SI message, the user clicks a link so that Internet Explorer Mobile receives the URL and downloads the file.

Applications or data can be distributed on a variety of storage cards including MultiMedia Card (MMC), SD, and CompactFlash (CF) cards that are inserted into a Windows Mobile device. Windows Mobile devices can automatically start an installation script if the storage card includes an Autorun file and the AutoRun security policy enables Autorun files on the device. The default policy is to prompt the user prior to execute an application. For more information about running an application from a storage card, see Automatically Run an Application from a Storage Card.