I have installed wix as a plugin in Visual studio. I am trying to search for if MATLAB Version 9.2 exists on the PC then allow installation or else abort. To achieve this I do like this
<Property Id="MATLABRUNTIMEEXISTS">
<RegistrySearch Id="Matlab_runtime_search"
Root="HKLM"
Key="SOFTWARE\MathWorks\MATLAB Runtime\9.2"
Name =" MATLABROOT"
Win64="yes"
Type="raw"/>
</Property>
<Condition Message="This application requires RUNTIME 9.2. Please install the Matlab runtime 9.2 then run this installer again.">
<![CDATA[Installed OR MATLABRUNTIMEEXISTS]]>
</Condition>
It works fine, and installer is halted when there is no MATLAB on PC. But even after installing MATLAB it stops the installer.
The MATLABROOT
key is "REG_SZ" and "C:\Program Files\MATLAB\MATLAB Runtime".
So what I want to test is actually only the presence of MATLABROOT
key.
I saw in other questions people are using <util:RegistrySearch>
, but I am not able to use that. I receive error "unsupported extension element", even though I have UtilExtension
as reference already added.
Could anyone suggest me what I need to do to actually make it work?