如何创建与两个程序的文件关联,并在两个程序都存在时将其设为默认值?

发布于 2024-08-28 02:25:48 字数 113 浏览 2 评论 0原文

我必须为具有两个程序的扩展名创建文件关联,如果程序 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

一身软味 2024-09-04 02:25:48

创建一个调用适当程序的包装器(只是一个简单的批处理脚本)。设置文件类型关联以使用包装器。

Create a wrapper (just a simple batch script) that calls the appropriate program. Set the file type association to use the wrapper.

豆芽 2024-09-04 02:25:48

我建议您使用注册表项。

在 WIX 中调用 CustomAction 以检查注册表项。检查可以像 if...else 一样简单

IF (Regitry_A != null && Registry_B != null)
{
//Choose program A
}
ELSE IF (Regitry_A != null)
{
//Choose Program A
}
ELSE
{
//Choose Program B
}

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

IF (Regitry_A != null && Registry_B != null)
{
//Choose program A
}
ELSE IF (Regitry_A != null)
{
//Choose Program A
}
ELSE
{
//Choose Program B
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文