Use this Windows tool to build CAB files for your Windows Mobile applications, giving you the means to install your own apps or apply batch settings.
slide 1 of 4
Build Your Own CAB File
Using a CAB file - one of the most important filetypes in Windows Mobile – is vital for installing the majority of software available for the platform.
Although the format is also used in the background on desktop Windows operating systems, it is on Windows Mobile that these filetypes have become more recognised, mainly as a means of compressing and applying program code to your mobile device.
Any type of program or settings can be compressed and installed or applied as a CAB file – code written in .NET, for instance, or some settings written in XML.
Using the Microsoft Cabinet Software Development Kit you can create CAB files on your desktop PC – it’s available free and is perfect for creating installer files for Windows Mobile.
slide 2 of 4
Using This Simple Cab File Maker for Windows Mobile
To use the Microsoft Cabinet Software Development Kit, you will first need to download it. Go to support.microsoft.com to download cabsdk.exe.
Cabsdk.exe is a self-extracting file – double click to run and extract the packaged files to an appropriately named folder, such as C:/CABmaker.
Using the Cabinet Software Development Kit to create Windows Mobile installer and settings files requires you use the command line. The makecab command converts your program files into a CAB file, making it ready to apply or install.
This example XML code for creating a Windows Mobile email settings CAB can be converted into a CAB file:
You might opt to edit this code in order to retain an archive of your own email settings – Notepad++ is a very good Windows desktop alternative to the standard Notepad, offering a range of visual stylings for different programming languages (download from Sourcefourge).
Certain changes will need to be made to this file should you choose to use it as an example – in particular the second <characteristic type=""> tag will need completing. This can be done by visiting www.guidgenerator.com and generating a GUID string to enter between the quotes. A GUID (Globally Unique Identifier) is a 128-bit identifier that confirms to the device you’re installing on that it is safe to run the code that follows.
You can use the XML code above to retain your email settings and apply them in the event of a change in your Windows Mobile device ROM or a new phone. As such you might opt to edit some of the fields, such as SERVICETYPE, INSERVER, OUTSERVER, NAME, AUTHNAME, AUTHSECTRET and REPLYADDR.
slide 4 of 4
Create the CAB File
To pack this example code into a cabinet file, save the code as _setup.xml somewhere safe, then go to Start > Run, enter CMD and click OK.
Before running the makecab command we need to switch the command line to point at the folder where the XML file has been saved (for instance if you saved the XML file in C:\emailxml, enter the command cd c:\emailxml). Note that a filename, mail.cab, is specified in the command. This can of course be changed:
makecab /D COMPRESS=OFF _setup.xml mail.cab
Browse to c:\emailxml – the CAB file has been created. By copying the file mail.cab to your phone and running it, the CAB will apply the email settings specified within the _setup.xml file to your Windows Mobile device.
The same principle of creating a CAB file can be applied to any program or XML settings for Windows Mobile.