Thanks for your advises. There are two problems with WixBundleInstalled: 1) I have to distinguish 3 states: version is same, current version is lower than installed version, current version is higher than installed version. But WixBundleInstalled only has value 0 or 1. 2) Which is even worse: I can't get this to work. I tried var x = _bootstrapperApplication.Engine.StringVariables["WixBundleInstalled"]; and var y = _bootstrapperApplication.Engine.NumericVariables["WixBundleInstalled"];
Both returned 0. When I handle the DetectRelatedBundle event however, I see that the bundle is already installed in the current version (which is correct)... -----Ursprüngliche Nachricht----- Von: Rob Mensching [mailto:r...@robmensching.com] Gesendet: Freitag, 28. September 2012 04:53 An: General discussion for Windows Installer XML toolset. Betreff: Re: [WiX-users] Custom Bootstrapper Application: Problem whentrying todetect if Bundle is already installed The wixstdba uses WixBundleInstalled variable to determine maintenance mode. I would recommend doing the same. On Thu, Sep 27, 2012 at 4:03 PM, Brian C <briancoving...@yahoo.com> wrote: > If you have an msi which is always installed, you could check the > version of it in the DetectRelatedMsiPackage callback. You have > access to both the major and minor version in the event argument. > > > > ________________________________ > From: "Frauenhoffer, Sabine" <sabine.frauenhof...@haufe-lexware.com> > To: General discussion for Windows Installer XML toolset. < > wix-users@lists.sourceforge.net> > Sent: Thursday, September 27, 2012 8:48 AM > Subject: Re: [WiX-users] Custom Bootstrapper Application: Problem > whentrying todetect if Bundle is already installed > > I tried that one already. It always returned 0 no matter what version > my bundle had. > > -----Ursprüngliche Nachricht----- > Von: Peter Shirtcliffe [mailto:pshirtcli...@sdl.com] > Gesendet: Donnerstag, 27. September 2012 15:36 > An: General discussion for Windows Installer XML toolset. > Betreff: Re: [WiX-users] Custom Bootstrapper Application: Problem > whentrying todetect if Bundle is already installed > > Could you use the built-in variable WixBundleInstalled instead ? I'm > not sure if that's version specific or not. It might be worth a look. > > -----Original Message----- > From: Frauenhoffer, Sabine > [mailto:sabine.frauenhof...@haufe-lexware.com] > Sent: 27 September 2012 14:13 > To: wix-users@lists.sourceforge.net > Subject: [WiX-users] Custom Bootstrapper Application: Problem when > trying todetect if Bundle is already installed > > Hi there, > > > > I have a problem when trying to detect whether my Bundle is already > installed. My usecase is as follows: > > > > I am creating a bundle with a custom UI. On startup I need to check > whether my bundle is already installed in the exactly same version to > determine if I have to show the maintenance page (if the versions > match), to block installation(if a newer version is already installed) > or show the install page (else). So I make a call to > _bootstrapperApplication.Engine.Detect(); > > > > My first idea now was to handle the event > _bootstrapperApplication.DetectRelatedBundle and somehow determine > whether the productcodes are different. This is not possible as I > can't get the product code of the bundle that is going to be installed. > > > > Then I thought it might be an idea, to check for some package which is > unique for my product. So I added the line > _bootstrapperApplication.DetectPackageComplete = DetectedPackage; (see > below) but it doesn't work as I expected: > > > > > > > > private void DetectedPackage(object sender, > DetectPackageCompleteEventArgs e) > > { > > PackageState.Obsolete > > if (e.PackageId.Equals("mypackage", > StringComparison.Ordinal)) > > { > > _state = (e.State == PackageState.Present) ? > InstallationState.DetectedPresent : InstallationState.DetectedAbsent; > > } > > } > > > > > > - If for example version 2.8 is installed and the Package in my > Bundle now has version 2.7 it returns PackageState.Absent (or Obsolete? > I can't reproduce it at the moment) which is just fine > > - If version 2.8 is installed and the Package in my Bundle now has > version 2.8, too, it syas e.State = PackageState.Present which is > correct, too. > > - But if version 2.8 is installed and the Package in my Bundle now > has version 2.9, I get e.State = PackageState.Present and would show > the maintenance page although I would need to show install page and > install the newer version. > > > > Is this intended or is it a bug? Am I getting something wrong? > > What I am doing as a workaround is, on DetectRelatedBundle event I > make some very ugly version comparison. Is there any other option? > > > > Any help appreciated, thanks in advance! > > > > Regards, > Sabine > > > > > > > ---------------------------------------------------------------------- > ------- > - > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics Download AppDynamics Lite > for free > today: > http://ad.doubleclick.net/clk;258768047;13503038;j? > http://info.appdynamics.com/FreeJavaPerformanceDownload.html > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > SDL PLC confidential, all rights reserved. > If you are not the intended recipient of this mail SDL requests and > requires that you delete it without acting upon or copying any of its > contents, and we further request that you advise us. > SDL PLC is a public limited company registered in England and Wales. > Registered number: 02675207. > Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire > SL6 7DY, UK. > > > > ---------------------------------------------------------------------- > -------- Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics Download AppDynamics Lite > for free today: > http://ad.doubleclick.net/clk;258768047;13503038;j? > http://info.appdynamics.com/FreeJavaPerformanceDownload.html > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > > ---------------------------------------------------------------------- > -------- Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics Download AppDynamics Lite > for free today: > http://ad.doubleclick.net/clk;258768047;13503038;j? > http://info.appdynamics.com/FreeJavaPerformanceDownload.html > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > ---------------------------------------------------------------------- > -------- Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics Download AppDynamics Lite > for free today: > http://ad.doubleclick.net/clk;258768047;13503038;j? > http://info.appdynamics.com/FreeJavaPerformanceDownload.html > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > -- virtually, Rob Mensching http://RobMensching.com LLC ------------------------------------------------------------------------------ Got visibility? Most devs has no idea what their production app looks like. Find out how fast your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219671;13503038;y? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Got visibility? Most devs has no idea what their production app looks like. Find out how fast your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219671;13503038;y? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users