如何创建与两个程序的文件关联,并在两个程序都存在时将其设为默认值?
我必须为具有两个程序的扩展名创建文件关联,如果程序 A 和 B 都存在,则选择程序 A 来打开文件。如果只有 B 存在,则选择程序 B 打开该文件。如果您可以提供 wix 代码,或者您可以向我提供注册表详细信息。
I have to create file association for an extension with two programmes and if both programmes A and B are present then choose program A to open the file. If only B is present then choose program B to open the file. If you can give the wix code or else you can provide me with registry details.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
创建一个调用适当程序的包装器(只是一个简单的批处理脚本)。设置文件类型关联以使用包装器。
Create a wrapper (just a simple batch script) that calls the appropriate program. Set the file type association to use the wrapper.
我建议您使用注册表项。
在 WIX 中调用 CustomAction 以检查注册表项。检查可以像 if...else 一样简单
I would suggest you to use registry entry.
Call a CustomAction in WIX to check for the registry entry. The check can be as simple as if...else