[wix-users] registry search during install

Brian Ward (Lincoln Bay Company) v-brwa at microsoft.com
Mon Feb 1 15:09:24 PST 2016


Hello,

I am trying to perform a two-step registry search during our install in order to place a couple of dlls into a client and server bin directory. The first registry search is used to determine the name of the current used configuration and the second registry search to obtain the location of a server and client bin.

My version one is using the "default install location" to get the location of the bin directories but will fail if the configuration is changed.

        <Property Id="AXCLIENTBINDIR">
            <RegistrySearch Id="AXCLIENTBINDIRProperty" Root="HKLM" Key="SOFTWARE\Microsoft\Dynamics\6.0\Configuration\Original (installed configuration)" Name="bindir" Type="directory" Win64="yes" />
        </Property>
        <Property Id="AXSERVERBINDIR">
            <RegistrySearch Id="AXSERVERBINDIRProperty" Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\Dynamics Server\6.0\01\Original (installed configuration)" Name="bindir" Type="directory" Win64="yes" />
        </Property>

Here is what I would like to do:

First, lookup the current configuration

        <Property Id="AXCURRENTCLIENTCONFIGURATION">
            <RegistrySearch Id="AXCURRENTCLIENTCONFIGURATIONProperty" Root="HKLM" Key="SOFTWARE\Microsoft\Dynamics\6.0\Configuration" Name="Current" Type="raw" Win64="yes" />
        </Property>
        <Property Id="AXCURRENTSERVERCONFIGURATION">
            <RegistrySearch Id="AXCURRENTSERVERCONFIGURATIONProperty" Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\Dynamics Server\6.0\01" Name="Current" Type="raw" Win64="yes" />
        </Property>

Then, use those values in the next registry search to get the location of the current bin directories

        <Property Id="AXCLIENTBINDIR">
            <RegistrySearch Id="AXCLIENTBINDIRProperty" Root="HKLM" Key=" SOFTWARE\Microsoft\Dynamics\6.0\Configuration\[AXCURRENTCLIENTCONFIGURATION]" Name="bindir" Type="directory" Win64="yes" />
        </Property>

        <Property Id="AXSERVERBINDIR">
            <RegistrySearch Id="AXSERVERBINDIRProperty" Root="HKLM" Key=" SYSTEM\CurrentControlSet\Services\Dynamics Server\6.0\01\[AXCURRENTSERVERCONFIGURATION]" Name="bindir" Type="directory" Win64="yes" />
        </Property>

>From what I have read, referencing a property in this way is not supported. If this is the case, is there another way that this could be done?
I have also tried using the util:registrysearch within a fragment but am unsure of how to include this back into the product wix or if this is even the correct approach.

Thank you in advance for your help!



More information about the wix-users mailing list