http://www.pluralsight.com/blogs/jimw/archive/2006/09/11/37653.aspxMore on device app installs - Installing a Windows Mobile device application from a desktop MSI Following my post a few weeks ago Adapt Your App Resources and References I've received a few questions on taking the application installation to the next step. You may recall that in that post, there was a sample of how to make a Windows Mobile application install more flexible. Basically the example shows two things: (1) How to create a single CAB file that installs multiple CAB files (2) Include conditional logic in the install to determine which CAB files to install The next logical step (and the issue I received the questions regarding) is how to trigger this install from a regular Windows MSI install package running on a desktop computer. The answer is pretty straight-forward but is sometimes difficult to find in the docs. To install a CAB file onto a Windows Mobile device from the desktop computer you use the CEAPPMGR.exe program. You simply execute the program passing it an *.ini file as the command line argument. The *.ini file basically lists the CAB files to install. The command line looks like the following “C:\Program Files\Microsoft ActiveSync\ceappmgr.exe” C:\xxx\MySetup.ini The App Mgr *.ini file format is much simpler then the *.ini file used to actually generate a CAB file. Basically the MySetup.ini can be as simple as this: [CEAppManager]
Version = 1.0
Component = DeviceApp[DeviceApp]
Description = My Device Application
CabFiles = MyDeviceApp.cab
Similar to the way the previous example works by including a custom setup DLL in the Master CAB on the device to install the individual CAB files, you need to create custom a DLL that is called from the MSI on the desktop to initiate the install on the device. The custom DLL simply calls CEAPPMGR.exe and passes the *.ini filename on the command line. One thing to note on executing the CEAPPMGR.exe program from the setup DLL: by convention (and good programming practice) do not hardcode the folder name where CEAPPMGR.exe is located. Instead you should get the fully qualified path from the registry. The fully qualified path is the default value for this registry key: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\CEAPPMGR.EXE Currently there’s no really solid single source that both explains and demonstrates the various details of application installation. There is one in the works but it won’t be up on MSDN until sometime in 2007. In the absence of a single point, use the following URLs to get a complete sample and some backing explanation.Sample
Using the Application Manager
Creating an ini File for the Application Manager
Simple Application Manager ini File Example That should do it. Please post your questions or experiences with the installs in the comments. I'd really like to see a dialogue come together on what people are experiencing. If we can get some solid real-life stories, we can get them included in the single-source Installation doc we're putting together.posted on Monday, September 11, 2006 3:58 PM
Comments