从 .NET CF 中以编程方式安装 CAB 文件
我想知道如何以编程方式从我的 .NET CF 应用程序安装 CAB 文件。我认为这就像以 windows ce 程序的名称和 CAB 文件路径作为参数启动一个进程一样简单。但我不知道该程序是什么或它位于何处。有人有什么想法吗?提前致谢。
I wanted to know how to programmatically install a CAB file from my .NET CF application. I figured it would be as simple as starting a process with the name of a windows ce program and the CAB file path as a parameter. But I don't know what that program is or where it's located. Any ideas anyone? Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我想我问这个问题的速度很快,答案很容易找到。因为 CAB 文件可以被操作系统识别,所以我可以简单地这样做:
我还发现了这个 这里,但我还没有尝试过。希望它对其他人有帮助。
I guess I asked this question to quickly, the answer was very easy to find. Because CAB files are recognized by the OS, I can simply do this:
I also found this here but I haven't tried it. Hope it helps someone else.
该进程名为 WCELOAD.EXE。以下是 MSDN 页面,了解更多信息: http://msdn.microsoft.com/ en-us/library/ms933760.aspx。
如果您需要支持“Pocket PC”(操作系统版本 4.x,之前称为 Windows Mobile),情况会变得更加复杂。 Pocket PC 不支持压缩的 CAB 文件,并且某些 WCELOAD.EXE 命令行参数未实现。
我发现将 CAB 文件设置为只读是最好的方法。如果用户通过文件资源管理器点击 CAB 文件,则系统将在安装完成后删除 CAB 文件。当您以编程方式调用 WCELOAD 时,可以使用 /delete 0 来防止这种情况发生。
The process is named WCELOAD.EXE. Here is the MSDN page for more information: http://msdn.microsoft.com/en-us/library/ms933760.aspx.
It gets more complicated if you have a requirement to support "Pocket PC" (the OS version 4.x before it was called Windows Mobile). Pocket PC does not support compressed CAB files and some of the WCELOAD.EXE command line parameters are not implemented.
I've found setting the CAB file to read-only is the best approach. If the user taps on the CAB file via File Explorer then the system will delete the CAB file after installation is complete. When you're calling WCELOAD programmatically, you can use /delete 0 to prevent this from happening.