I am using WiX 3.5 RTM (3.5.2519.0).  I have several x64 products that
depend on a COM+ application, and they may be installed either concurrently
or separately, so I am using a Wixlib to include the COM+ application in
the main feature of each product.  I use a custom dialog to prompt for a
user name and password to use as the application's identity.



    <ComponentGroup Id="MyApplication">

        <Component SharedDllRefCount="yes" Directory="WellKnownDir">

            <File KeyPath="yes" Name="MyApplication.dll" />

            <complus:ComPlusApplication Id="MyApplication" Name="My Name"
ApplicationAccessChecksEnabled="no"

                                        Identity="[SERVICEIDENTITY]"
Password="[SERVICEPASSWORD]">

                <complus:ComPlusAssembly Id="MyAssembly" Type=".net"
DllPathFromGAC="no"

                                         DllPath="[#MyApplication.dll]"
TlbPath="[#MyApplication.tlb]"

                                         RegisterInCommit="yes">

                    <complus:ComPlusComponent Id="MyComponent1" CLSID="
PUT-CLSID-HERE" />

                    <complus:ComPlusComponent Id="MyComponent2" CLSID="
PUT-CLSID-HERE" />

                </complus:ComPlusAssembly>

            </complus:ComPlusApplication>

        </Component>

        <Component SharedDllRefCount="yes" Directory="WellKnownDir">

            <File KeyPath="yes" Name="MyApplication.tlb" />

        </Component>
    </ComponentGroup>




(I have used Orca to confirm that the auto-generated component GUIDs are
identical in both products.)


When I install the first product that contains this, it installs fine.  When
I install a second product that contains this,
theConfigureComPlusInstall_x64 action returns



                Error 28018. A COM+ application with the same name already
exists.  (0      )



This also appears in a pop-up message box, with options to Cancel, Retry,
and Ignore.  If I choose "Ignore", and if the second installer repeats the
user name and password prompts beforehand, this works fine.  If I choose
"Ignore", and if the second installer uses a FileSearch to suppress the
username/password prompt when MyApplication.dll is already installed, then
the install fails, and rolls back, and removes the COM+ application.  (The
failure appears to be because it tries to change the COM+ application’s
identity to Interactive User, and Server 2008 policy forbids this, but the
CA cannot change it back.)



I can see in the Installer\...\Components registry that it is registering
both products as clients of this Component, and the SharedDLLs registry
entry has a count of 2, so Windows Installer proper is maintaining the
correct reference count for this component.  However, the ComPlusExtension
is trying to install the application a second time when its key path
already has a reference count >= 1, and if this fails then it uninstalls
the application during rollback despite its key path having a reference
count > 1.


The one situation where reference counting works the way I expect it to is
during uninstall:  if I manage to install two products successfully,
uninstalling one of them does not remove the COM+ application, because its
reference count is still > 0.



The WiX documentation mentions the concept of a ComPlusApplication
"locator" or "locater".  I have the impression that the locator/locater
mechanism is for modifying an existing COM+ application, while a
ComPlusApplication in a Component is only supposed to create a new
application rather than modify an existing one?  That is not the behavior I
am observing, however.


I found that I can suppress the attempt to recreate the COM+ application by
setting NeverOverwrite="yes" on the Component.  I am not thrilled about
having to resort to this, but it does seem to eliminate the "COM+
application of the same name already exists" error and the need for the
user name/password prompt when MyApplication.dll is already present.



Does anyone have experience with this type of scenario -- sharing a COM+
application among multiple products?  I want to ensure that the uninstall,
repair, and maintenance behavior is robust.


(I realize the user-supplied Identity and Password adds additional
complications during repair and maintenance; I will start a separate thread
for this.)



Thanks,

Mike
------------------------------------------------------------------------------
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