.NET Compact Framework - Windows Mobile 6.5 上的 CAB 自动更新
我正在为我的 Windows Mobile 6.5 .NET CF 3.5 应用程序开发自动更新功能。 我最终得到了以下解决方案。
- 我使用 SOAP WebService 来检查应用程序的新版本是否可用。
- 如果有更新的版本,我会在 SOAP 响应中获取 URL,下载它。新版本只是一个CAB完整安装文件。
- 下载版本后,我会在下载的 CAB 上使用 /silent 和 /noui 参数调用 wceload。我想要无人值守安装,因为该应用程序的用户是汽车司机,他们不太擅长操作移动设备。
该过程进展顺利,但有一个例外 - /noui 或 /silent 选项强制 wceload 不显示任何窗口。我的应用程序消失了,并在后台安装了新版本。问题是驱动程序有时会过早尝试再次打开应用程序。另一点是我希望我的应用程序在更新过程完成后自动启动。因此,我创建了一个单独的 exe 应用程序,它只调用 wceload,如果完成安装,它将运行更新的版本。一切都适用于 onr 例外 - 该安装程序 exe 是我的 CAB 的一部分,因此它位于其中,当 wceload 安装 CAB 时,它会关闭安装程序(因为它是 CAB 安装程序的一部分)。因此,安装过程被中断。 我的问题是 - 有没有一种方法可以“告诉 CAB”不要终止属于该 CAB 的特定 exe?
问候
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
它并没有真正回答您的问题,但您可以执行以下操作:
[设置结束] =>它会启动您更新的应用程序
【稍等一下】 =>它会自行关闭,更新后的应用程序即可使用
It is not really responding to your question but you can do the following :
[end of setup] => it starts your updated app
[Wait a little bit] => it closes itself and the updated app is ready to use
CAB 安装和 WCELOAD 在很多方面都受到限制。您需要某种 UI,告诉用户事情正在进行中,并且您想要有条件地安装 CAB 的某些部分,而这根本无法通过开箱即用的 wceload 来实现。您也许可以使用自定义安装 DLL 来破解其中的一些内容,但我认为“条件安装部分”仍然会成为阻碍。
一种替代方法是不使用 wceload,而是创建您自己的 CAB 提取工具。然后,您可以根据文件名等执行您自己的 UI 和自定义逻辑。我将 几年前的 SDK 和示例安装程序就可以实现这一点 - 诚然它不是免费的,但最低成本选项只有 5 美元,所以它非常接近。
较新的 CAB 实际上包含一个描述安装操作的 XML 文档(此外到我编写的 SDK 解码的较旧的 .000 二进制文件描述符),因此您也可以仅使用它来完成所有提取并节省 5 美元。
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.
不要使用出租车。使用包含可执行文件和内部 cab 的 tar.gz 包。使用 SharpZipLib 进行解压。只需运行可执行文件即可完成工作。使用 \windows\wceload 工具运行 cab 安装。
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 \windows\wceload tool to run the cab install.