紧凑框架:Windows 安装程序问题
我终于完成了我的杀手级应用程序,但现在遇到了一些问题。 我已经创建了 cab 文件(构建良好并完美安装/在 PDA 设备上完美运行),现在我正在尝试创建我的 Windows 安装程序。
我已阅读有关如何创建安装程序的 MSDN 文章(请参阅此处),但是似乎缺少一些信息,即Ini文件的格式是什么?
我做了一些挖掘,并提出了这个 Ini 文件内容(其中 AppName 是我的应用程序的名称):
[ceAppManager]
Version = 3.0
Component = AppName
[AppName]
Description = AppName
Uninstall = AppName
CabFiles = AppName.cab
这有什么问题吗? 安装程序安装成功,但出现错误:
应用程序管理器无法安装 您的移动设备上的此应用程序 由于安装文件无效。 重新安装并重试。
我之前已经在另一个使用 ActiveSync 的应用程序上实现了此功能。 我当前正在使用 Windows Mobile 设备中心,但安装程序肯定应该是相同的吗? 我猜我的ini文件有问题?
即使有人能给我一个更好的安装指南的链接,以将出租车安装到 PDA 上,我也会很高兴。
提前致谢。
I've finally finished my killer app and now I've got a bit of an issue. I've created my cab file (builds fine and installs perfectly/runs perfectly on the PDA device) and now I'm trying to create my windows installer.
I've followed an MSDN article of how to create the installer (see here), however it seems to be missing some information, i.e. what's the format of the Ini file?
I have done some digging and I've come up with this Ini file content (where AppName is the name of my application):
[ceAppManager]
Version = 3.0
Component = AppName
[AppName]
Description = AppName
Uninstall = AppName
CabFiles = AppName.cab
Is there anything wrong with that? The installer installs successfully and I get the error:
Application manager cannot install
this application on your mobile device
due to an invalid setup file.
Reinstall and try again.
I've got this working before on another application using ActiveSync. I am currently using Windows Mobile Device Center, but surely the installers should be the same? I am guessing there's something wrong with my ini file?
I would be happy even if someone could give me a link to a better setup guide to install a cab onto a PDA.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
查看修改后的 .INI 文件,它看起来正确。 它应该可以工作——然而,Vista 和 WMDC 是奇怪的鸟。 您是否可能尝试从“标准”用户无权访问的位置将 .INI 文件加载到 WMDC 中?
我不知道您的 Windows 安装程序将文件提取到哪里,但也许尝试一下用户文件夹?
我唯一能想到的另一件事是,旧的 .INI 以某种方式被 WMDC“缓存”,并且没有注册新的(看起来我以前可能遇到过这种情况)。 您可以尝试从 WMDC 中的“添加/删除程序”小程序中删除该程序条目,然后重新安装您的应用程序。
Looking at your revised .INI file, it looks right on. It should work -- however, Vista and WMDC are strange birds. Is it possible you're trying load the .INI file into WMDC from a location that a "standard" user doesn't have permissions to?
I don't know where your Windows installer is extracting the files to, but perhaps try a User folder?
The only other thing I can think of is that the old .INI is somehow being "cached" by WMDC and not registering the new one (it seems like I might have run into this before). You might try removing the program entry from the Add/Remove Programs applet in WMDC and reinstalling your app.
版本号必须为“1.0”,而不是示例中的“3.0”。 CEAppManager 部分也可能区分大小写 - 我认为无论如何都是如此。 请查看MSDN 文档。
The version number must be "1.0" not "3.0" as in your example. The CEAppManager section may also be case sensitive - I would assume it is anyway. Take a look at the MSDN docs.
在遇到同样的问题后(是的,我知道这是 2016 年),终于在这个旧文档中找到了关键信息: 使用 .cab 和 .msi 文件部署 .NET Compact Framework 2.0 应用程序
它比原始问题引用的较新文档更加详细,并且包含以下有用的建议:
启用此功能后,它将弹出对话框,解释解析 INI 文件所采取的步骤,并向您报告所遇到的错误的所有详细信息,我很快就让我的 INI 文件正常工作了。
After encountering the same issues (yeah, I know it is 2016), finally found the critical information in this older document: Deploying .NET Compact Framework 2.0 Applications with .cab and .msi Files
It is quite more detailed than the newer document referred to by the original question, and it contain this helpful advice:
With this enabled, it will pop up the dialogue boxes, explaining the steps it is taking to parse the INI file and reports you all the detailed information on the errors it encounters and I quickly got my INI file working.