Wix Installer Registry Search Fails

情到浓时终转凉″ 提交于 2020-01-05 07:18:49

问题


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:

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

回答1:


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...>


来源:https://stackoverflow.com/questions/52744148/wix-installer-registry-search-fails

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!