[wix-users] Component IDs for Major Upgrade
Paul Mumford
paul.mumford at gmail.com
Thu Dec 7 11:04:03 PST 2017
Yeah I agree with Edwin. From what I recall from my testing if you start
changing the component GUIDs on a major upgrade the dll's services etc dont
go away and you end up with a weird situation where you have to manually
edit the registry and you have 2 entry's of the same solution in windows
add/remove programs. Just change the package GUID, the version (in 2 places
in the XML, cant remember where) and it just does it. This works for major
upgrade.
On 7 December 2017 at 18:20, Edwin Castro via wix-users <
wix-users at lists.wixtoolset.org> wrote:
> You should definitely *not* change component GUIDs if the component has not
> changed.
>
> I would discourage you from scheduling RemoveExistingProducts
> afterInstallFinalize. To quote from the documentation:
>
> "Schedules RemoveExistingProducts after the InstallFinalize standard
> action. This is similar to the afterInstallExecute and
> afterInstallExecuteAgain schedulings but takes place outside the
> installation transaction so if installation of the upgrade product fails,
> Windows Installer does not roll back the removal of the installed product,
> so the machine will have both versions installed."
>
> Any scheduling that happens outside the installation transaction is bad for
> users when failures occur and will create a negative impression of the
> product and company responsible for that product.
>
> --
> Edwin G. Castro
>
> On Thu, Dec 7, 2017 at 9:47 AM, Ven H <venh.123 at gmail.com> wrote:
>
> > Thanks a lot for your response Edwin. In my case, only my file (content /
> > version) changes and not key paths. Also, I am setting the Schedule
> > attribute on the MajorUpgrade element to afterInstallFinalize. Hence, I
> > believe I should not change the Component Guids. Right?
> >
> > Regards,
> > Venkatesh
> >
> > On Thu, Dec 7, 2017 at 10:49 PM, Edwin Castro via wix-users <
> > wix-users at lists.wixtoolset.org> wrote:
> >
> >> Note you *MUST* change the component GUID if the component changes in
> any
> >> way (including key path) with the exception of a file's version.
> >>
> >> If the component hasn't changed at all but the file's version changed,
> >> then
> >> the component GUID must not change if you schedule
> RemoveExistingProducts
> >> before InstallFinalize. This is required because Windows Installer will
> >> reinstall the component first (including increasing ref counts) and then
> >> uninstall components at the end (decreasing ref counts). If you change
> >> anything about a component other than the file's version, then you are
> >> breaking the component rules and upgrades will not work properly.
> >>
> >> If you schedule RemoveExistingProducts after InstallInitialize, then
> your
> >> old product is completely uninstalled before the new product is
> installed.
> >> In this case you don't have to be so strict with the component rules
> >> because your ref counts never go up higher than 1. The downside of this
> >> approach is that you completely uninstall the old product and that might
> >> have effects you didn't expect like configuration and data files might
> be
> >> deleted and recreated.
> >>
> >> --
> >> Edwin G. Castro
> >>
> >>
> >>
> >> On Wed, Dec 6, 2017 at 12:27 PM, Hoover, Jacob via wix-users <
> >> wix-users at lists.wixtoolset.org> wrote:
> >>
> >> > Depends on when RemoveExistingProducts is scheduled and if the new
> >> install
> >> > has a component in the same key path but a different component id.
> >> >
> >> > Best rule of thumb is 1 file per component, and let WiX generate
> stable
> >> > GUID's (ala *). This will cause any change in the key path to get a
> new
> >> > GUID.
> >> >
> >> > -----Original Message-----
> >> > From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On
> >> Behalf
> >> > Of Paul Mumford via wix-users
> >> > Sent: Wednesday, December 6, 2017 2:18 PM
> >> > To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
> >> > Cc: Paul Mumford <paul.mumford at gmail.com>
> >> > Subject: Re: [wix-users] Component IDs for Major Upgrade
> >> >
> >> > Yeah think so, the only guid that needs changing is the package
> (which I
> >> > found easier to just use * to generate a new one) and change the major
> >> > version. As long as you never change the upgrade guid. Someone confirm
> >> > please because im no longer in that contract and cant see the source
> >> code
> >> > anymore. I did have that all written down in comments in the package
> >> after
> >> > r&d.
> >> >
> >> > On 6 December 2017 at 17:35, Ven H via wix-users <
> >> > wix-users at lists.wixtoolset.org> wrote:
> >> >
> >> > > Do the component Guids need to be the same for Major upgrade?
> >> > >
> >> > > Regards,
> >> > > Venkatesh
> >> > >
> >> > > ____________________________________________________________
> ________
> >> > > 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