Wix Installer Registry Key Always Returns 1 -
Wix Installer Registry Key Always Returns 1 -
good afternoon, trying check specific registry key. if key exists, want display message application needs removed prior continuing installation. if key doesn't exist, installation should continue. know upgrade elements , such, in case not applicable due company's construction . have:
<product id="b93715aa-ab42-426d-b47e-5f0370bba259" name="myapp" language="1033" version="20.2.0.0" manufacturer="mycompany" upgradecode="c2d873b4-6160-4d6a-91b7-9cb7193bbddf" > <package installerversion="500" compressed="yes" installscope="permachine" /> <majorupgrade downgradeerrormessage="a newer version of [productname] installed." /> <mediatemplate embedcab="yes" /> <property id="arpsystemcomponent" value="1" /> <property id="testproperty" secure="yes" value="0"> <registrysearch id="mytestproperty" root="hklm" key="software\mycompany\myapp" name="installpath" type="raw" win64="no" /> </property> <condition message="you must uninstall myapp first before running installer."> <![cdata[testproperty<>0]]> </condition> </product>
i've tried other things , 0, etc. no avail. msi log shows property set 1. understanding that, if key exists, property set 1, otherwise not set. whatever set condition's check be, message either shows up, or never shows (whether registry key exists or not).
any help resolving appreciated. should note that, since friday, i've read many articles on site , others, , answers there have not helped. tried next illustration of checking .net framework, didn't work me. should experience windows installer technology limited.
try this:
<property id="testproperty" secure="yes"> <registrysearch id="mytestproperty" root="hklm" key="software\mycompany\myapp" name="installpath" type="raw" win64="no" /> </property> <condition message="you must uninstall myapp first before running installer."> <![cdata[installed or not testproperty]]> </condition>
remove explicit setting of value on property, , test empty or not. added installed property well, not perform check if application installed. may or may not want maintain that.
wix windows-installer wix3.9
Comments
Post a Comment