[wix-users] quick question re SharedDllRefCount...

Steve Ogilvie sogilvie at msn.com
Fri Oct 23 13:07:54 PDT 2015


Hi folks,
sigh I can't remember this for the life of me...
Okay I have 2 products called A and B
Within A I have File_X in two different MSI's being installed to 2 different placesIn B I have File_X being installed to another location
File_X is a COM file that is registered
So if I want to install A then B or B then A and later uninstall one of them I do NOT want the COM registration to be removed...
INSTALL A:
MSI 1:
<Component Id="cmp_TL_MyFile" Guid="{D4EDBCFA-...}" Shared="yes" SharedDllRefCount="yes">              <!-- Need to use SelfRegCost and the Class/TypeLib elements in order for the DLL to load properly -->              <File Id="file_TL_MyFile" KeyPath="yes" Source="$(var.somePath)\TL_MyFile.dll" SelfRegCost="1">                <Class Id="{F1A000BF-CF05-...}" Context="InprocServer32" Description="TL_MyFile OleDocumentProperties" ThreadingModel="apartment">                  <ProgId Id="TL_MyFile.OleDocumentProperties" Description="My Company OLE Document Properties Reader 2.1" />                </Class>                <TypeLib Id="{F1A000BF-CF00-...}" Description="My Company OLE Document Properties Reader 2.1" HelpDirectory="WixLibRedirectFolder" Language="0" MajorVersion="2" MinorVersion="1">                  <Interface Id="{F1A000BF-CF01-...}" Name="_OleDocumentProperties" ProxyStubClassId32="{00020424-...}" />                  <Interface Id="{F1A000BF-CF02-...}" Name="SummaryProperties" ProxyStubClassId32="{00020424-...}" />                  <Interface Id="{F1A000BF-CF03-...}" Name="CustomProperty" ProxyStubClassId32="{00020424-...}" />                  <Interface Id="{F1A000BF-CF04-...}" Name="CustomProperties" ProxyStubClassId32="{00020424-...}" />                </TypeLib>              </File>         </Component>
MSI 2:
<Component Id="cmp_TL_MyFileDll" Guid="{3969ED7B-...}" Shared="yes" SharedDllRefCount="yes">            <!-- Need to use SelfRegCost and the Class/TypeLib elements in order for the DLL to load properly -->            <File Id="file_TL_MyFileDll" KeyPath="yes" Source="$(var.somePath)\TL_MyFile.dll" SelfRegCost="1">              <Class Id="{F1A000BF-CF05-...}" Context="InprocServer32" Description="TL_MyFile OleDocumentProperties" ThreadingModel="apartment">                <ProgId Id="TL_MyFile.OleDocumentProperties" Description="My Company OLE Document Properties Reader 2.1" />              </Class>              <TypeLib Id="{F1A000BF-CF00-...}" Description="My Company OLE Document Properties Reader 2.1" HelpDirectory="WixLibRedirectFolder" Language="0" MajorVersion="2" MinorVersion="1">                <Interface Id="{F1A000BF-CF01-...}" Name="_OleDocumentProperties" ProxyStubClassId32="{00020424-...}" />                <Interface Id="{F1A000BF-CF02-...}" Name="SummaryProperties" ProxyStubClassId32="{00020424-...}" />                <Interface Id="{F1A000BF-CF03-...}" Name="CustomProperty" ProxyStubClassId32="{00020424-...}" />                <Interface Id="{F1A000BF-CF04-...}" Name="CustomProperties" ProxyStubClassId32="{00020424-...}" />              </TypeLib>            </File>        </Component>
INSTALL B:
<Component Id="cmp_TL_MyFileDll" Guid="{FF5D759D-...}" Shared="yes" SharedDllRefCount="yes">          <!-- Need to use SelfRegCost and the Class/TypeLib elements in order for the DLL to load properly -->            <File Id="file_TL_MyFileDll" KeyPath="yes" Source="$(var.somePath)\TL_MyFile.dll" SelfRegCost="1">              <Class Id="{F1A000BF-CF05-...}" Context="InprocServer32" Description="TL_MyFile OleDocumentProperties" ThreadingModel="apartment">                <ProgId Id="TL_MyFile.OleDocumentProperties" Description="My Company OLE Document Properties Reader 2.1" />              </Class>              <TypeLib Id="{F1A000BF-CF00-...}" Description="My Company OLE Document Properties Reader 2.1" HelpDirectory="DIRECTORY_PATH_PLUGINS" Language="0" MajorVersion="2" MinorVersion="1">                <Interface Id="{F1A000BF-CF01-...}" Name="_OleDocumentProperties" ProxyStubClassId32="{00020424-...}" />                <Interface Id="{F1A000BF-CF02-...}" Name="SummaryProperties" ProxyStubClassId32="{00020424-...}" />                <Interface Id="{F1A000BF-CF03-...}" Name="CustomProperty" ProxyStubClassId32="{00020424-...}" />                <Interface Id="{F1A000BF-CF04-...}" Name="CustomProperties" ProxyStubClassId32="{00020424-...}" />              </TypeLib>            </File>        </Component>
The component GUID is different for each componentThe Class ID is the same for the three componentsThe TypeLib ID is the same for the three componentsThe Interface ID's are the same for the three components
If I uninstall A, and B is left behind, File_X is not longer registered as a COM object...
What am I doing wrong?
Thanks,
Steveps have a great weekend all! 		 	   		  


More information about the wix-users mailing list