Reputation: 1307
I'm currently using Wix 3.10 on windows 10.
I'm trying to find if the VC++ 2005 runtime x64 (v8.0.61000) is installed by product code. It's definitely showing in add-remove programs. The ProductCode definitely exists in the uninstall registry section and in Win32_Product. Get-Package in powershell shows it as well:
Get-Package | Where Name -Like "*2005*" | select -First 1 | fl
PropertyOfSoftwareIdentity : PropertyOfSoftwareIdentity
FastPackageReference : {ad8a2fa1-06e7-4b0d-927d-6e54b3d31028}
ProviderName : msi
Source :
Status : Installed
SearchKey :
FullPath :
PackageFilename : ?
FromTrustedSource : False
Summary :
SwidTags : {Microsoft Visual C++ 2005 Redistributable (x64)}
CanonicalId : msi:Microsoft Visual C++ 2005 Redistributable (x64)/8.0.61000
Metadata : {ProductCode}
SwidTagText : <?xml version="1.0" encoding="utf-16" standalone="yes"?>
<SoftwareIdentity
name="Microsoft Visual C++ 2005 Redistributable (x64)"
version="8.0.61000"
versionScheme="multipartnumeric"
tagId="ad8a2fa1-06e7-4b0d-927d-6e54b3d31028"
xmlns="http://standards.iso.org/iso/19770/-2/2015/schema.xsd">
<Meta
ProductCode="{ad8a2fa1-06e7-4b0d-927d-6e54b3d31028}" />
</SoftwareIdentity>
Dependencies : {}
IsCorpus :
Name : Microsoft Visual C++ 2005 Redistributable (x64)
Version : 8.0.61000
VersionScheme : multipartnumeric
TagVersion :
TagId : ad8a2fa1-06e7-4b0d-927d-6e54b3d31028
IsPatch :
IsSupplemental :
AppliesToMedia :
Meta : {{ProductCode}}
Links : {}
Entities : {}
Payload :
Evidence :
Culture :
Attributes : {name,version,versionScheme,tagId}
But when I create a launch condition, and use util:ProductSearch it returns blank, causing the condition to trigger and exit.
<Fragment>
<Property Id="LC_MSVCPP_8_0_X64_LATEST_REQUIRED" Value="LaunchCondition" />
<util:ProductSearch Id="MSVC2005.v8.0.61000.x64" Variable="MSVCPP_8_0_61000_X64_DETECTED" ProductCode="{AD8A2FA1-06E7-4B0D-927D-6E54B3D31028}" Result="version" />
<Condition Message="VC++ 2005 x64 runtime not found!">MSVCPP_8_0_61000_X64_DETECTED</Condition>
</Fragment>
I've also tried a reboot.
I should note that is definitely searchable by upgradeCode. But then I have to do version comparison, and the real problem here is if there is a bug or not?
Any ideas?
Thanks so much!
Upvotes: 1
Views: 911
Reputation: 21886
util:ProductSearch
works in bundles, not MSI packages, so it can't be used in a launch condition.
Upvotes: 2