CAB auto update on Windows Mobile 6.5

I'm developing an auto update feature for my Windows Mobile 6.5 .NET CF 3.5 application. I haev ended up with following solution.

  • I use SOAP WebService to check whether a new version of application is available.
  • If there is a newer version, I get the URL in SOAP response, download it. The new version is simply a CAB full installation file.
  • As soon as the version is downloaded i call wceload with /silent and /noui parameters on the downloaded CAB. I want unattended installation because users of this application are car drivers who are not so skill-full at operating mobile devices.
  • The process goes smoothly with one exception - the /noui or /silent options forces wceload to not display any window. My application simply dissapears and in the background the new version is installed. The problem is the drivers sometimes try to turn the application on again too soon. Another point is I'd like my application starts automatically after the update process is completed. So I created a separate exe application that simply calls wceload and if it completes installation it runs the updated version. All works with onr exception - this installer exe is part of my CAB so it is within it and when wceload installs the CAB, it shuts down the installer (because it is a part of the CAB installer). Thus, the installation process is interrupted. My question is - is there a way to "tell CAB" to not terminate particular exe from those one that are part of this CAB?

    Regards


    It is not really responding to your question but you can do the following :

  • launch another (small) executable showing a "Update in progress" screen.
  • do your stuff behind the scene
  • [end of setup] => it starts your updated app [Wait a little bit] => it closes itself and the updated app is ready to use


    CAB installation and WCELOAD are limited in many ways. You're after some sort of UI that tells the user that things are in progress and you're wanting to conditionally install certain pieces of a CAB and that simply isn't achievable with wceload out of the box. You might be able to hack some of this together with a custom setup DLL, but I think the "conditional install pieces" is going to still be the show stopper.

    One alternative is to not use wceload, but instead create your own CAB extraction tool. You could then do all of your own UI and custom logic based on the file name, etc. I put together an SDK and sample installer several years ago that would allow this - admittely it's not free, but the lowest cost option is only $5 so it's pretty close.

    Newer CABs actually contain an XML doc that describes the install actions (in addition to the older .000 binary file descriptor that the SDK I wrote decodes), so it's also possible that you could do all of the extraction just using that and save the $5.


    Dont use a cab. Use a tar.gz package with an executable and the cab inside. Use SharpZipLib for decompression. Just run the executable to do the work. Use the windowswceload tool to run the cab install.

    链接地址: http://www.djcxy.com/p/82672.html

    上一篇: Google API和.NET Compact Framework

    下一篇: Windows Mobile 6.5上的CAB自动更新