[wix-users] Shared text file between installers
Walter Dexter
wfdexter at gmail.com
Wed Apr 6 08:25:23 PDT 2016
That's a good point Jacob. I don't think I'm going to do exactly that, but
I'm going to get close.
In MSI-1, I'm going to say "If MSI-2 is installed, install the INI file for
MSI-1 and MSI-2. Otherwise install the INI file for MSI-1 only."
Then the opposite in MSI-2; "if MSI-1 is installed install the INI file for
MSI-1 and MSI-2. Otherwise install the INI file for MSI-2 only."
This file persisting after it uninstalls isn't really a big deal, so I'm
just going to mark it Permanent so the uninstall leaves whatever was last
installed there.
Let me know if that seems colossally stupid for some reason I'm not seeing.
:)
Thanks,
Walt
On Mon, Apr 4, 2016 at 5:16 PM, Hoover, Jacob <Jacob.Hoover at greenheck.com>
wrote:
> Because of the comment `Having "V1 and V2 INI file" present when only
> MSI-1 or MSI-2 are installed isn't the end of the world.`
>
> I'd opt for simple and just always install it and not worry about
> semi-custom actions.
>
> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf
> Of Walter Dexter
> Sent: Monday, April 04, 2016 4:37 PM
> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
> Subject: Re: [wix-users] Shared text file between installers
>
> Jacob, Farrukh, thanks for the feedback.
>
> I've been looking at links and documents and your responses. What I'm
> thinking is that I can install both versions of the file, then use CopyFile
> to move the right one into place based on <Condition>s.
>
> After a weekend of thought, it turns out there are really 3 versions of
> the file, corresponding to "V1 installed", "V2 installed" and "V1 and V2
> installed."
>
> So MSI-1 would check if MSI-2 is installed. If MSI-2 is installed, it
> copies "V1 and V2 INI file". Otherwise, "V1 INI file" is copied.
>
> Similarly, MSI-2 checks if MSI-1 is installed. If MSI-1 is installed ,it
> copies "V1 and V2 INI file." Otherwise, "V2 INI file" is copied.
>
> Having "V1 and V2 INI file" present when only MSI-1 or MSI-2 are installed
> isn't the end of the world. I
>
> I"ll need to do a bit of studying on how CopyFile works at uninstall, and
> what I want to happen in that case, but does that sound reasonable?
>
>
>
>
> Thanks,
>
> Walt.
>
> On Sat, Apr 2, 2016 at 12:41 PM, Walter Dexter <wfdexter at gmail.com> wrote:
>
> > Yes, MSI 2 overwrites the files installed by MSI 1. They're using the
> > same GUID so Windows Installer does reference counting.
> >
> > I'm thinking maybe I need to do something on install and uninstall
> > that just sorts out the files. They're Ini files and ideally would
> > have three possible sets of values in one section depending on whether
> > 1, 2 or both are installed.
> >
> >
> >
> > > On Apr 1, 2016, at 11:49 PM, Farrukh Waheed <farrukh1 at gmail.com>
> wrote:
> > >
> > > So, technically, when MSI 2 was installed, it may have overwritten 4
> > shared
> > > files (same named) installed by MSI1?
> > > I think, when you'll Uninstall MSI1, the overwritten files may not
> > > be removed by MSI1 uninstaller...
> > >
> > > However, when you'll install updated MSI1, these files may get
> > overwritten
> > > again, depending upon the time and date i.e.
> > > If already installed files are older one, these would be replace by
> > updated
> > > MSI1.
> > >
> > > On a side note, please do consider the Upgrade scenarios in your
> MSIs...
> > >
> > > On 2 April 2016 at 02:25, Hoover, Jacob <Jacob.Hoover at greenheck.com>
> > wrote:
> > >
> > >> Hmm, not that I like this...
> > >>
> > >> But could MSI1 also conditionally deploy MSI2 magic text files if
> > >> MSI2
> > is
> > >> detected?
> > >>
> > >> Probably going to have to suppress ICE30.
> > >>
> > >> Similar to suggestions made here:
> > >>
> > http://stackoverflow.com/questions/967748/wix-conditionally-installing
> > -a-file-based-on-os
> > >>
> > >> But instead of OS, it's based on if the MSI 2 was detected? Or
> > >> better yet, install files with unique file names (avoiding ICE
> > >> issue), and then use a semi custom action to inject a CopyFile as
> needed.
> > >>
> > >> -----Original Message-----
> > >> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On
> > Behalf
> > >> Of Walter Dexter
> > >> Sent: Friday, April 01, 2016 1:11 PM
> > >> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
> > >> Subject: [wix-users] Shared text file between installers
> > >>
> > >> Hi, all.
> > >>
> > >> Looking for a little strategy advice if anyone has some.
> > >>
> > >> I have a product that installs a number of binary and text files.
> > >> Only
> > one
> > >> versioned EXE; the rest are other MSIs and text files. (Yes, I'm
> > >> using
> > one
> > >> MSI to drop off other MSIs. The others don't get installed on that
> > system.)
> > >>
> > >> This existing product is deployed to around 14,000 of our internal
> > servers.
> > >> Call it MSI-1.
> > >>
> > >> I now have a second version of it that mostly has different files.
> > >> Call
> > it
> > >> MSI-2.
> > >>
> > >> At first I'll need to install both MSI-1 and MSI-2 on all servers,
> > >> but around a year from now, I'll be uninstalling MSI-1 and leaving
> MSI-2.
> > >>
> > >> Both MSI-1 and MSI-2 have four text files in common - same name,
> > different
> > >> contents.
> > >>
> > >> I can't trust either the folks running our Microsoft system
> > >> management tools or the folks on our help desk to reliably do the
> > >> right thing. I
> > wish
> > >> I could, but I can't.
> > >>
> > >> In most cases, installing these does what I'd like, but if the
> > >> following events occurs, the MSI-1 version of these text files are on
> the drive.
> > Is
> > >> there a way around that?
> > >>
> > >>
> > >> 1. Install MSI-1
> > >> 2. Install MSI-2
> > >> 3. Uninstall MSI-1
> > >> 4. Install MSI-1
> > >>
> > >>
> > >> Note that I'll be sending out a revised "MSI-1" in a month or two,
> > >> so I
> > do
> > >> have an opportunity to make changes to the MSI-1 package to address
> > this.
> > >>
> > >> Also note that this is strictly a file deployment. Even the
> > >> versioned
> > EXE
> > >> that gets deployed is never run on the server; these are file
> > >> servers deployed across our retail locations, and the files
> > >> delivered are
> > accessed
> > >> across the network by other in-store systems. So my only
> > >> opportunity to
> > run
> > >> code is in the installer.
> > >>
> > >> I don't really have any need for these text files to ever get
> > >> deleted, even on uninstall, so I guess I could write a custom
> > >> action that figures out which one belongs and do something, but
> > >> really that doesn't sound
> > ideal.
> > >>
> > >> Thanks for any words of wisdom.
> > >>
> > >> Walt
> > >>
> > >> ___________________________________________________________________
> > >> _ 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