Question

I have a hard time getting wix 3.7 burn bundle to work. I want to check if a specific COM library exists on the system (it's a prerequisite). I've tried:

  1. util:RegistrySearch for SOFTWARE\Classes\Installer\Assemblies\Global under interop.name, Version=1.170.0.0, ... - I can't add a wildcard, and key name contains version
  2. util:FileSearch for [%WINDIR%]\Windows\assembly\GAC_MSIL\interop.name\1.170.0.0__a59bfa3a209beb60\interop.name.dll - again, can't add a wildcard, and I'm not sure if I could assume it will be always under GAC_MSIL
  3. util:ComponentSearch - I'm not sure how to find out guid to search for - it seems to always return false whatever I try.
  4. non-util, regular FileSearch - doesn't seem to work under within bootstrap.
  5. I've also noticed a HKCR\TypeLib\{F1E91071-83CC-4766-90BA-E038B005ACE} entry, but again, I'm not sure if it would be reliable to check for?

Is there any good simple way to check for a COM dll existence in GAC? I don't mind if in some border cases (e.g. not full uninstall) it will miss something, I just want to cover most cases and avoid blocking installation because of unreliable checks.

Était-ce utile?

La solution

I've ended up using conditions and regular FileSearch in the msi package, it might be a bit annoying that bootstrap installs all prerequisites before msi package and this check is run, but I can live with it.

<Property Id="DEP_EXISTS">
   <DirectorySearch Id="CheckFileDir" Path="$(env.WINDIR)\assembly\" Depth="10" AssignToProperty="yes">
     <FileSearch Id="CheckFile" Name="Interop.Dependency.dll" />
   </DirectorySearch>
</Property>
<Condition Message="Dependency not found!">DEP_EXISTS</Condition>

Works fine from what I can tell.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top