After a little trial and error I came up with this:
      <dep:Provides Key="SQLServer2008R2ExpressSP1" Version="10.50.2500.0" />

Where dep is defined as:
      xmlns:dep="http://schemas.microsoft.com/wix/DependencyExtension";

<dep:Provides /> is placed as a child of the ExePackage.

What this does is create a registry key in HKCR\Installer\Dependencies and this 
ties the package to the bundle. It appears to work ok but I would appreciate 
any feedback if this is incorrect or there is more I need to do.

Neil

-----Original Message-----
From: Rob Mensching [mailto:r...@robmensching.com] 
Sent: 01 October 2012 18:43
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] ExePackage uninstalled on upgrade

The WiX toolset automatically creates a "dependency provider" for packages that 
it can (MsiPackage and in WiX v3.7, MspPackage). Since ExePackages are opaque, 
you'd need to add your own "dependency provider" (Provides element from 
WixDependencyExtension) to get the engine to do reference counting.

On Mon, Oct 1, 2012 at 6:44 AM, Neil Sleightholm <n...@x2systems.com> wrote:

> More info: Running v1 installs SQL, v2 removes it, v3,4,5 etc installs 
> SQL then immediately removes it!
>
> In the log file created for the upgrade there is this entry
> "[1664:16B4][2012-10-01T13:30:31]: Skipping dependency registration on 
> package with no dependency providers: SQLServerExpress".
>
> Neil
>
>
> >I have a simple burn package that install SQL express and one MSI. 
> >The install works the first time I run it but when I upgrade it the 
> >SQL package is removed (if I upgrade again it is put back). It 
> >appears from the logs that it doesn't recognise that the package is 
> >referenced and so the upgrade causes it to be removed.
> >
> >My authoring looks like this:
> >
> >    <?define InstanceName = "TEMP" ?>
> >    <?define SqlWebLink =
> >
> http://download.microsoft.com/download/D/1/8/D1869DEC-2638-4854-81B7-0
> F374
> >55F35EA/SQLEXPR_x86_ENU.exe ?>
> >
> >    <!-- Read SQL Server keys to find current instance and version -->
> >    <util:RegistrySearch
> >      Id="SqlInstanceFound"
> >      Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft SQL 
> >Server\Instance Names\SQL" Value="$(var.InstanceName)"
> >      Result="exists" Variable="SqlInstanceFound" />
> >
> >    <PackageGroup Id="SQLServerExpress">
> >      <ExePackage Id="SQLServerExpress"
> >        DisplayName="SQL Server 2008 R2 Express"
> >        Cache="no"
> >        Compressed="no"
> >        PerMachine="yes"
> >        Permanent="no"
> >        Vital="yes"
> >        Name="Redist\SQLEXPR_x86_ENU.exe"
> >        SourceFile="Redist\SQLEXPR_x86_ENU.exe"
> >        DownloadUrl="$(var.SqlWebLink)"
> >        InstallCommand="/ACTION=Install 
> >/INSTANCENAME=$(var.InstanceName) /FEATURES=SQL /SECURITYMODE=SQL 
> >/SAPWD=pass /TCPENABLED=1 /SQLSVCACCOUNT=&quot;NT AUTHORITY\NETWORK 
> >SERVICE&quot; /SQLSVCSTARTUPTYPE=Manual 
> >/SQLSYSADMINACCOUNTS=BUILTIN\Administrators /Q /HIDECONSOLE 
> >/SkipRules=RebootRequiredCheck /IAcceptSQLServerLicenseTerms"
> >        RepairCommand="/ACTION=Repair 
> >/INSTANCENAME=$(var.InstanceName) /Q /HIDECONSOLE"
> >        UninstallCommand="/Action=Uninstall
> >/INSTANCENAME=$(var.InstanceName) /FEATURES=SQL /Q /HIDECONSOLE"
> >        DetectCondition="SqlInstanceFound">
> >        <ExitCode Value ="3010" Behavior="forceReboot" />
> >      </ExePackage>
> >    </PackageGroup>
> >
> >Can anyone see why the package is removed on upgrade?
> >
> >Neil
> >
> >Neil Sleightholm
> >X2 Systems Limited
> >n...@x2systems.com
> >---------------------------------------------------------------------
> >-----
> >----
> >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
>



--
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

Reply via email to