I need to create a WIX installer which will register one of our COM
libraries. As a fresh user in WIX as well as in COM, I couldn't find a
standard way to do it. I am using WIX 3.6

Here is how I do it. Firstly, I have one class library which is marked as
"Register for COM interop" in VS2010, so now I have both myLib.dll and
myLib.tlb files. Then I think I need to use heat to harvest the type
library. In 
http://stackoverflow.com/questions/567925/typelib-generation-and-installation-with-wix
this link , it suggests that I should simply make the command like "heat
file c:\my\path\to\myLib.tlb -out tlb.wxs".  I checked the generated wxs
file, changed the GUID, but since I had a little problem there using the
ComponentRef(it said unresolved reference), I decided to just copy the
component declaration part to my main Product.wxs, hoping it will do the
same thing, after all, the generated one is just a ComponentRef. And here is
the code snapshot:

<Component Id="tlbReference" Guid="MY_GUID">
        <File Id="myLib.tlb" KeyPath="yes" Source="myLib.tlb">
          <TypeLib Id="{GENERATED_ID_WHICH_I_JUST_USED}" Description="SOME
DESCRIPTION FROM MY LIB" Language="0" MajorVersion="525" MinorVersion="0">
            <Interface Id="{GENERATED_ID}" Name="NAME_FROM_LIB"
ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" />
            ...MORE INTERFACES
          </TypeLib>
        </File>
</Component>

Besides, I also make myLib.dll as one Component in the same folder where the
TypeLib element is put, so both dll and tlb file will be there(I don't know
whether it is necessary).

However, after compilation of the installer and installation, I still find
my COM functions not working. I checked the registry, it seems that in
HKLM\SOFTWARE\Classes, there doesn't exist my newly-supposed-to-register
classes. Anybody can tell me what I missed or did wrong? Thanks!

--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Proper-way-to-Register-COM-TypeLib-tp7571310.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to