开发者

Find third-party 32 bit product on 32 and 64 bit machines

I'm authoring an MSI file that installs an add-on to an existing application that I find via its HKLM\Software\... key using the RegLocator table; this works quite well on 32 bit 开发者_开发知识库Windows.

On 64 bit Windows, however, the key can be found under HKLM\Software\WOW6432Node\...; this is obviously correct as the other application is a 32 bit application, however it makes the RegLocator stumble.

Is there a way to check both the original and the rewritten key path, and use the first one that exists (if neither key exists, the component should not be installed at all)?


Hmm, according to the documentation of RegLocator table, if you don't set the msidbLocatorType64bit of the Type column, it will search in the 32-bit portion of the registry. Otherwise it'll search the 64-bit part. So, if your third-party is always 32-bit (at least that's what I understand from your question), you can leave that bit unset and it'll always look into 32-bit hive.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜