I think you may be missing a dependency provider, inside your <ExePackage> you 
need something like:
        <dep:Provides Key="SQLServer2012Express,YourInstanceName" Version="You 
SQL version" />

This isn't documented but what it does is register that a package is being used 
so on uninstall it won't be removed if there are still references to it. I'd 
advise setting you YourInstanceName in the Key as that will allow multiple 
instances of the same version of SQL and set Version to the full SQL version 
e.g. "11.0.2100.60" as this will allow for service pack upgrades.

This solved this sort of problem for me although I didn't have the scenario 
where I don't upgrade SP1 to SP2 but that shouldn't matter.

Neil

-----Original Message-----
From: Sunny Li [mailto:sunnie...@gmail.com] 
Sent: 27 November 2012 00:45
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] How to perform an upgrade without removing a package?

Hi there,

I'm currently trying to install the following bundle in wix burn v3.6 that
contains:

1) SQL Server 2008 R2 (ExePackage)
2) My main program

That all works fine, but when I create a upgraded bundle to update my main 
program, it will remove SQL Server 2008 R2 during the stage where it removes 
the older bundles.

Is there a way to prevent the bootstrapper from removing the exepackage?

I know I can counter-act that by writing some managed code in PlanPackageBegin 
to change the requestedstate to stay as "Present" instead of "Absent". However 
that also triggers another problem.

Consider the scenario when you're upgrading from SQL 2008 R2 SP1 to SP2...
but you don't want to force your users to upgrade to SP2 if they already have 
SP1 installed (because it's slow and it's 'good enough').

WiX won't cache the SP2 package during the install time because we've detected 
that the ExePackage is already present. And this will cause a problem when the 
user is trying to uninstall, because the SP2 package won't be located on the 
system.

Is there a way to make a bundle so that you can also have some flexibility in 
what version the ExePackage is? For example, both SP1 and SP2 are tolerable but 
SP2 is preferred, and I only want to include the SP2 package for an offline 
installer.

Thanks,

--
Sunny Li
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single web 
console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud 
infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to