Travis Pettry
Travis Pettry

Reputation: 1352

Wix Installer Registry Search Fails

I am attemping to do a registry search with in a wix installer so that I know where to install my plug in. I am trying to look up where Tekla Structures 2018i is installed at. However, every time I try running the installer my condition fails. Any help would be greatly appreciated.

Product tag:

<Property Id="TSMAINDIR">
        <RegistrySearch Id="TS2018iSetupMain"
                        Root="HKLM"
                        Key="Software\Tekla\Structures\2018i\setup"
                        Name="MainDir"
                        Type="raw"
                        Win64="yes"/>
      </Property>
      <Condition Message="This application requires Tekla Structures 2018i. Please install Tekla Structures 2018i then run this installer again.">
        <![CDATA[Installed or TSMAINDIR]]>
      </Condition>

RegEdit: enter image description here

UPDATE:

I have created a log file. The file is rather lengthly so I will not post it. However, When I do a search for TSMAINDIR I find the following:

AppSearch: Property: TSMAINDIR, Signature: TS2018iSetupMain
MSI (c) (00:34) [14:25:26:994]: Note: 1: 2262 2: Signature 3: -2147287038 
MSI (c) (00:34) [14:25:26:994]: PROPERTY CHANGE: Adding TSMAINDIR property. Its value is 'C:\Program Files\Tekla Structures\'.

MSI (s) (E4:2C) [14:25:27:694]: Ignoring disallowed property TSMAINDIR

Upvotes: 1

Views: 1637

Answers (1)

Stein &#197;smul
Stein &#197;smul

Reputation: 42136

Looks OK to me. You have the right bitness flag so you search the x64 section of the registry. Have you looked in the log file? How to create a log file.

I don't really think it should matter since you are not in deferred mode, but try setting the property to be secure:

<Property Id="TSMAINDIR" Secure="yes">
<...etc...>

Upvotes: 2

Related Questions