开发者

How to create file association with two program and making one default if both present?

开发者 https://www.devze.com 2022-12-26 06:42 出处:网络
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 choos

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.


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


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
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号