Volodymyr Bezuglyy
Volodymyr Bezuglyy

Reputation: 16825

Is it possible to read from 64 and 32-bit registry entries in the same installation?

In my installation I need to check presence of 64-bit entry at first.
And read its value if it is present in 64-bit part of registry.
If entry is absent then I need to try to read this entry from 32-bit registry part(Wow6432Node).

I need to read it directly from wxs file or from custom action on VBScript.
Is it possible to do?

Upvotes: 1

Views: 1047

Answers (1)

jbudreau
jbudreau

Reputation: 1307

If you're running a 64bit MSI you can set two AppSearch/RegLocator entries using the style:

<Property Id="MY_32BIT_REG">
    <RegistrySearch Id="my32bitreg"
                    Root="HKLM"
                    Key="SOFTWARE\My Company"
                    Name="foo"
                    Type="raw"
                    Win64="no" />
</Property>
<Property Id="MY_64BIT_REG">
    <RegistrySearch Id="my64bitreg"
                    Root="HKLM"
                    Key="SOFTWARE\My Company"
                    Name="foo"
                    Type="raw"
                    Win64="yes" />
</Property>

These entries will check the appropriate "HKLM\SOFTWARE\My Company" and "HKLM\SOFTWARE\Wow6432Node\My Company" registry hives.

Upvotes: 1

Related Questions