26.9 Deploying Mobile Applications Using ActiveSync

 <  Day Day Up  >  

You want to create an application installer that uses Microsoft ActiveSync.


Technique

The previous recipe demonstrated how to automatically generate CAB files for distribution as well as how to edit the generated INF to further customize the install. Although you can simply distribute the CAB files to users, they would have to manually copy the CAB files to their devices and then run them to start the installation. The ActiveSync utility provided for mobile devices running Microsoft operating systems allows you to provide automatic installation.

Assuming that you have already created the CAB files as outlined in the previous recipe, the next step is to create an INI file containing information used by ActiveSync. Fortunately, this file is quite a bit smaller than the INF and definitely much easier to create. You need two sections for the INI file; the first is called [CEAppManager] and contains a Version entry and a Component name, which is the same name as the next section. This next section contains three entries: a Description , which is displayed to the user during installation; the Uninstall entry, which is placed in the Add/Remove group in ActiveSync; and the CabFiles entry, which is a comma-delimited list of your application's CAB files created from the previous recipe. The full INI file should appear something like the following:

 
 [CEAppManager] Version      = 1.0 Component    = MyApp [MyApp] Description  = My Application Uninstall    = My Application CabFiles     = MyApp_PPC.ARM.CAB,MyApp_PPC.ARMV4.cab,MyApp_PPC.MIPS.cab,MyApp_PPC.SH3.cab 

Once you create this file, create a normal installation application using one of the industry-standard installation programs or by simply creating one yourself. In any case, the install program needs to look for the file named CeAppMgr.exe and launch it passing the INI file created in this recipe on the command line. Rather than search through the file system looking for the CeAppMgr.exe application, you can query the Registry by looking at the value in the following key:

 
 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\CEAPPMGR.EXE 

Comments

For a Smart Device Application, you can just give users the option to download the CAB file and run it on their devices. However, that isn't the most user friendly method. First, every user must know what type of processor he is running in his mobile device. Furthermore, he has to know how to transfer files from his desktop to a location on his device. If that weren't enough, he must then locate the CAB file once it's on the device and double-click it to start the installation. If any user is also accustomed to uninstalling applications on the device using the ActiveSync application from the desktop computer, he won't be able to use the manual CAB-copy method just described. Therefore, to create the best user experience possible, automate the installation as much as possible using the ActiveSync tool.

 <  Day Day Up  >  


Microsoft Visual C# .Net 2003
Microsoft Visual C *. NET 2003 development skills Daquan
ISBN: 7508427505
EAN: 2147483647
Year: 2003
Pages: 440

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net