Reputation: 1761
I have a condition which checks if VC++ 2013 is installed.
<Property Id="VCREDIST_INSTALLED">
<RegistrySearch Id="RegistrySearch_VCRedist_Installed"
Key="$(var.VCREDIST_PRODUCT_ID_STR)" Name="Install" Root="HKLM" Type="raw" />
</Property>
<Condition Message="Visual C++ 2012 x64 is not installed">
<![CDATA[INSTALLED Or VCREDIST_INSTALLED]]></Condition>
When I install the MSI (by double clicking) it, it installs correctly. And now if I click the MSI again, it fails giving me the error "Visual C++ 2012 x64 is not installed".
I also tried running
msiexec /i product.msi
This runs fine although it doesn't update my installed files.
I am trying to understand what's going on here but cant seem to figure out! How do I avoid this error?
I would rather have my condition to be as simple as this -
<Condition Message="Visual C++ 2012 x64 is not installed">
<![CDATA[VCREDIST_INSTALLED]]></Condition>
But it doesn't work as expected. It just fails everytime. Seems like the RegistrySearch doesn't happen by then?
Upvotes: 0
Views: 289
Reputation: 55620
Properties are case sensitive in Windows Installer. The INSTALLED property is not the Installed Property.
The other half of that condition is the VCREDIST_INSTALLED property. You'd need to log the second installation and read through it to see whats going on with AppSearch and LaunchConditions with regard to that property. My best guess based on your description is that the registry search is authored wrong and never works and that during the first installation you are setting INSTALLED to a value.
Upvotes: 3