[wix-users] LRE: SQL fails on repair

Carlos Sosa carlos.sosa.us at outlook.com
Sun Jan 7 13:35:49 PST 2018


Hello, I'm finally trying to get this working but for some reason I cannot get the detect condition to work, this is what I have done so far:

1. Created a registry search, if I understand this correctly this would assign the value 13.0.1601.5 to the variable SQL:

  <Fragment>
    <util:RegistrySearch
        Id="SQLINSTALLED"
        Variable="SQL"
        Root="HKLM"
        Key="SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL13.SQLEXPRESS\MSSQLServer\CurrentVersion"
        Value="CurrentVersion"
        Result="value"/>  
  </Fragment>

2. Then I'm creating a variable checking the version

<WixVariable Id="SQLDetectCondition" Value="SQL = 13.0.1601.5"  Overridable="yes" />

3. and Finally using that as my detect condition for the exe:

DetectCondition="SQLDetectCondition">

Something tells me that the error is in step 2m I checked the logs but it says:
Condition 'SQLDetectCondition' evaluates to false

a) How can I write the SQL variable or my WixVariable SQLDetectCondition to the log? Then I could see what I'm getting on return.
b) What am I doing wrong?

Any help is appreciated.
Best.


-----Original Message-----
From: Joseph L. Casale [mailto:jcasale at activenetwerx.com] 
Sent: Thursday, December 14, 2017 12:59 PM
To: 'WiX Toolset Users Mailing List' <wix-users at lists.wixtoolset.org>
Cc: Carlos Sosa <carlos.sosa.us at outlook.com>
Subject: RE: SQL fails on repair

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Carlos Sosa via wix-users
Sent: Thursday, December 14, 2017 12:29 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Carlos Sosa <carlos.sosa.us at outlook.com>
Subject: [wix-users] SQL fails on repair


> Hello, we have installed SQL just fine but when I select repair it fails:
> <ExePackage Id="SQL"
>                    Vital="yes"
>                   SourceFile="Lib\SQLEXPR_x64_ENU.exe"
>                   InstallCommand="/QUIETSIMPLE 
> /IACCEPTSQLSERVERLICENSETERMS /SAPWD=password /ACTION=Install 
> /FEATURES=SQL /SECURITYMODE=SQL /INSTANCENAME=MYINSTANCE"
> 
> Name="!(wix.SQL2016ExpPackageDirectory)SQLEXPR_x64_ENU.exe"
>                   Cache="no"
>                   DisplayName="SQL Configuration, this takes time, do 
> not interrupt the installation."
>                   Permanent="yes"/>

Use conditions, you are re-installing it on top of itself which is most certainly not supported with the same invocations arguments as the install set. See the SQL cli arguments doc for the repair set.


More information about the wix-users mailing list