[References]More on device app installs – Installing a Windows Mobile device application from

來源:互聯網
上載者:User
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

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.