registry - WiX Bundle bal:condition - util:RegistrySearch - Not working -
a similar post here cant mine working wix bundle bal:condition - util:registrysearch variable false
sir, struggling exact thing working. "version" set 0 when registry key absent , 1 when key present. either cases bundle still gets installed.
i using vs 2015 , wix 3.10. pls can help.
<wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/utilextension" xmlns:bal="http://schemas.microsoft.com/wix/balextension"> <bundle name="xxx" version="xxx" manufacturer="xxx" upgradecode="xxx" iconsourcefile="xxx" copyright="xxx" > <util:registrysearchref id='searchformyins' /> <bootstrapperapplicationref id="managedbootstrapperapplicationhost"> ... </bootstrapperapplicationref> <chain> <packagegroupref id='netfx40web' /> <msipackage sourcefile="$(var.dummyinstaller.targetdir)\dummyinstaller.msi" displayname="dummy conditioning" /> </chain> </bundle> <fragment> <util:registrysearch id='searchformyinst' variable="version" result="exists" root="hklm" key="software\myinst" win64="yes" /> <bal:condition message="thirdparty application required.">version</bal:condition> </fragment> </wix>
the reason installing
<bal:condition message="messagehere">version</bal:condition> will evaluate existance of version not value of version. since registry search on exists, version always defined , condition passes. (i believe because registry search variables implicitly string variables)
if add "version = 1" installation should continue when registry search find you're looking for.
i point out particularly nasty pitfall of type of condition. happens if user installs bundle decides don't need bundle or third party program anymore , uninstall them both uninstall third party program first?
your installer unable uninstall because when tries run fail bal:condition every time since third party program no longer present on system.
to solve behaviour should add "or wixbundleinstalled" bal:condition.
Comments
Post a Comment