0

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.

trakos
  • 841
  • 8
  • 25
  • In most cases, it is simpler and more decoupled to just launch a 3rd-party installer that installs a sufficient version of a dependency if there is one available from the creator of the component. Many dependencies are part of a suite of files anyway so checking for one file often isn't sufficient. Such an installer itself should be able to handle its own cases of already being installed, upgrading etc. After all, you already have a bootstrapper in your installation system. – Tom Blodget Oct 19 '13 at 03:19
  • Yes, you have a point, but unfortunately it's a bit like using office interop - the application I'm depending on is way bigger than mine, mine is more of an utility for it. I just want to make sure somebody doesn't do some stupid mistake - I know my app will crash if the user decides to uninstall dependency later on. – trakos Oct 19 '13 at 18:53

1 Answers1

0

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.

trakos
  • 841
  • 8
  • 25