[wix-users] dependent installs and use tracking - my solution...

Lewis Henderson henderso at opentext.com
Thu Mar 17 13:52:07 PDT 2016


Hi Everyone,

Ok, there may be something else at work here.  We (for historical reasons) want to keep the "original" version of the config file, and create a "live" version for the customer to edit as needed.  The code at work here is:

<Component ... NeverOverwrite="yes">
  <File Id="my_file" Name="#confg.ini">
    <CopyFile Id=Copy_my_file" DestinationName="config.ini" />
  </File>
  ...
</Component>

Then a CA edits both files (Before="InstallFinalize"), filling in the install path - therefore neither file is the same as .the "source" file.  Without the NeverOverwrite="yes" attribute, the files would be overwritten.

One other thing - this may well be the issue: I'm breaking the component rules and have more than one file in the component.  The KeyPath file isn't one that's being edited.

Does this make more sense?

				Lewis Henderson
				OpenText, Inc.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Phil Wilson
Sent: Thursday, March 17, 2016 4:31 PM
To: 'WiX Toolset Users Mailing List'
Subject: Re: [wix-users] dependent installs and use tracking - my solution...

I'm curious too - if an installed data file is modified by the user then Windows Installer will not overwrite it.  The overwrite rule:

https://msdn.microsoft.com/en-us/library/windows/desktop/aa370531(v=vs.85).a
spx

So there should be no need to worry about replacement of installed data files that have been modified after install. 

Phil W 

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Wesley Manning
Sent: Thursday, March 17, 2016 11:59 AM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] dependent installs and use tracking - my solution...

You found you had to set NeverOverwrite="yes"?  I thought that was default MSI behavior. Actually now I remember there are command lines to force MSI to overwrite so maybe that prevents that case.  Just curious.

Wes

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Lewis Henderson
Sent: March-17-16 11:18 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] dependent installs and use tracking - my solution...

Hi Everyone,

Thanks for all of your suggestions.  After some redesign and a lot of testing, here is what I ended up doing.

The problem: I have a sub-module that is shared between several MSI's, and it performs some configuration upon installation.  The customer may also edit the configuration files after installation.  If the sub-module is installed by a second MSI, the files (and configuration info) would be overwritten (because the files were not the same as the original source).

The solution: First, I created shared components rather than a merge module.
I moved the configuration files into their own component and used the NeverOverwrite="yes" attribute to avoid overwriting.  I then modified the conditions on the CA that did the configuration (yes, that part was the CA) so that it only ran the CA if the module wasn't already present on the system (by setting/checking a registry value) and the sub-module was being installed.  This works as desired.

Thanks again for your help.

				Lewis Henderson
				OpenText, Inc.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Rob Mensching
Sent: Wednesday, March 9, 2016 2:49 PM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] dependent inistalls and use tracking

More about Merge Modules in the history here:
http://robmensching.com/blog/posts/2008/10/10/what-are-.wixlibs-and-why-woul
d-you-use-them/

_____________________________________________________________
 Short replies here. Complete answers over there: http://www.firegiant.com/

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Wesley Manning
Sent: Wednesday, March 9, 2016 11:46 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] dependent inistalls and use tracking

I shouldn't say merge modules are obsolete but they are archaic (even MSI is a bit archaic although wix is good at abstracting that away for the most part).  From what I understand they were meant to allow teams to work on their own and then combine together into one installer.  Unfortunately they have some issues.  No personal experience myself much but others here mentioned issues.  Might not be what your experiencing.

I meant a shared .wxs file but you might be able to use a wix include file (.wxi). There are also a WiX library file (.wixlib).  Not sure if that really gives you anything more than a .wxs file other than it's precompiled I believe.

You might need to set a MSI property when you installed tomcat so you can check that property before running your custom action so the other installer (A or B) doesn't run the custom action again if tomcat is already installed.
Or do the detection in your custom action. Because although the msi will ref count your shared files it will still run the custom action unless you have some condition on it. If you do use a msi property you have to use the remember property pattern (http://robmensching.com/blog/posts/2010/5/2/the-wix-toolsets-remember-prope
rty-pattern/) as the MSI installer won't remember it for you if you do an upgrade or uninstall.

Wes

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Lewis Henderson
Sent: March-09-16 3:14 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] dependent inistalls and use tracking

Thanks for the reply, Wes.

To answer your points (in reverse order):

1) No, this isn't an upgrade situation (yet).  This is a set of new installs, but they may be upgraded at some point.
2) Yeah, I got the GUID typo...
3) Now the main bits...

Do you mean use reference the tomcat component as a .wxi file?  The merge module was set up to do much the same thing, but if they're obsolete...  In any case, I'll give that a try.  Yes, there are CA's run to perform the configuration, but I may be able to trigger them based on component install status.  As long as the reference tracking realizes that the same component is in two different MSI's and doesn't install twice or remove too early, then I'm good.  That's the problem I'm trying to fix.

I'll let you (all) know what I find.  Thanks again.

				Lewis Henderson
				OpenText, Inc.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Wesley Manning
Sent: Wednesday, March 9, 2016 1:22 PM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] dependent inistalls and use tracking

Also are you doing an upgrade on older versions or installing the products on a clean machine?  If an upgrade then the majorupgrade element would affect things as well:
http://wixtoolset.org/documentation/manual/v3/xsd/wix/majorupgrade.html.
See the Schedule attribute.

Wes

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Wesley Manning
Sent: March-09-16 2:16 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] dependent inistalls and use tracking

Sorry by GUI I mean GUID.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Wesley Manning
Sent: March-09-16 2:15 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] dependent inistalls and use tracking

I don't know merge modules or tomcat but can speak in general. I don't think you need to be using merge modules for the common portion. Merge modules are kind of an old technology and temperamental from what I read on here.

I'm assuming you have two MSI packages for A and B and they share components for C (i.e. tomcat). I would just put the shared tomcat files in a separate wix file and reference it from your A and B projects. As long as the GUI and install path are the same for each component you install then it should up rev the reference count and not reinstall the components. Do you have custom actions that you run as part of installing tomcat?

Wes

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Lewis Henderson
Sent: March-09-16 10:12 AM
To: wix-users at lists.wixtoolset.org
Subject: [wix-users] dependent inistalls and use tracking

Hi Folks,

I asked a similar question a few days ago and got no response, so I'll ask again with a little more concrete situation.

I have two product installs that both require an apache-tomcat install.  I have no control of which product will be installed first, or if both will be installed.  What I need is for both installs to be able to do an initial tomcat install, or if its already installed, not to install again (as that would overwrite the previous configuration settings).  However, on uninstall, tomcat can't be removed until both products are removed, no matter which installed it in the first place.

I have tomcat coded as a merge module which works fine for uninstall, but the second install does re-install tomcat and therefore wipes out the original configuration settings.

I haven't delved into bundles, but the product installation UI's are pretty complicated, and tomcat may only be installed if certain features of one of the products is selected.  Can a BA handle this kind of complexity?

In any case, I need help to find a solution to this kind of situation.
Please help me out here.  Thanks.

                                                                Lewis Henderson
                                                                OpenText, Inc.

PS: Yes, I need both products to use the same tomcat instance.


____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/



____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list