简体   繁体   English

.NET Compact Framework-Windows Mobile 6.5上的CAB自动更新

[英].NET Compact Framework - 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. 我正在为Windows Mobile 6.5 .NET CF 3.5应用程序开发自动更新功能。 I haev ended up with following solution. 我最终得到以下解决方案。

  1. I use SOAP WebService to check whether a new version of application is available. 我使用SOAP WebService来检查是否有新版本的应用程序可用。
  2. If there is a newer version, I get the URL in SOAP response, download it. 如果有较新的版本,我会在SOAP响应中获取URL,然后下载它。 The new version is simply a CAB full installation file. 新版本只是一个CAB完整安装文件。
  3. As soon as the version is downloaded i call wceload with /silent and /noui parameters on the downloaded CAB. 下载版本后,我会在下载的CAB上调用带有/ silent和/ noui参数的wceload。 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. 该过程顺利进行,只有一个例外-/ noui或/ silent选项强制wceload不显示任何窗口。 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. 因此,我创建了一个单独的exe应用程序,该应用程序仅调用wceload,如果完成安装,它将运行更新的版本。 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). 所有工作均具有onr例外-此安装程序exe是我的CAB的一部分,因此它在其中。当wceload安装CAB时,它会关闭安装程序(因为它是CAB安装程序的一部分)。 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? 我的问题是-有没有办法“告诉CAB”不终止属于该CAB的那些特定的exe?

Regards 问候

Dont use a cab. 不要使用出租车。 Use a tar.gz package with an executable and the cab inside. 使用tar.gz软件包,其中包含可执行文件和cab。 Use SharpZipLib for decompression. 使用SharpZipLib进行减压。 Just run the executable to do the work. 只需运行可执行文件即可。 Use the \\windows\\wceload tool to run the cab install. 使用\\ windows \\ wceload工具运行cab安装。

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. CAB安装和WCELOAD在许多方面受到限制。 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. 您正在使用某种UI,该UI告诉用户事情正在进行中,并且您希望有条件地安装CAB的某些部分,而开箱即用wceload根本无法实现。 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. 您可能可以通过自定义安装DLL来破解其中的一些内容,但是我认为“条件安装件”仍然是节目的制胜法宝。

One alternative is to not use wceload, but instead create your own CAB extraction tool. 一种选择是不使用wceload,而是创建自己的CAB提取工具。 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. 然后,您可以根据文件名执行所有自己的UI和自定义逻辑,等等。几年前,我组装了一个SDK和示例安装程序 ,这将允许这样做-诚然,它不是免费的,但最低的成本选择仅为5美元,因此非常接近。

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. 较新的CAB实际上包含描述安装操作的XML文档 (除了我编写的SDK所解码的较旧的.000二进制文件描述符之外),因此也有可能您可以仅使用该提取并保存$ 5来进行所有提取。 。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从服务器下载.xml文件并保存到Windows Mobile 6.5 .net Compact Framework中的本地存储中 - download .xml file from server and save to local storage in windows mobile 6.5 .net compact framework .NET 紧凑型框架,枚举 windows (windows mobile) - .NET Compact Framework, enumerate windows (windows mobile) 在.NET紧凑框架中切换表单(windows mobile 6) - Switching forms in .NET compact framework (windows mobile 6) Windows Mobile 6.5 CAB签名-附加值是什么? - windows mobile 6.5 CAB signing - what is the added value? 是否可以在Windows Mobile 6.5上运行为Windows Embedded Compact 7开发的程序? - Is it possible to run a program developed for Windows Embedded Compact 7 on Windows Mobile 6.5? 通过msi文件在Windows Mobile中部署.Net Compact Framework应用程序 - Deploying .Net Compact Framework applications in windows mobile via msi file 带有大字符串的JSON和.net Compact Framework(Windows Mobile) - JSON and .net Compact Framework (Windows Mobile) with large Strings C#.Net Compact Framework 3.5 FtpWebRequest Windows Mobile 6 - C# .Net Compact Framework 3.5 FtpWebRequest Windows Mobile 6 Windows移动Compact Framework SqlCeConnection - Windows mobile Compact Framework SqlCeConnection Windows Mobile 6.5-.NET CF连接管理 - Windows Mobile 6.5 - .NET CF connection management
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM