3
votes

WiX bundle does not allow me to install SqlLocalDB.msi silently and errors out stating following :

The required IACCEPTSQLNCLILICENSETERMS=YES command-line parameter is missing. By specifying this parameter, you acknowledge that you accept the end user license terms for SQL Server 2016.

I tried to insert the commandline argument by doing the following.

<MsiPackage SourceFile="SqlLocalDB.msi" Vital="yes" DisplayInternalUI="no">
    <MsiProperty Name="CommandLineArgLocalDB" Value="IACCEPTSQLNCLILICENSETERMS=YES"/>
</MsiPackage>

I continue to get the same error. Is there any issues with what I have done?

EDIT :

I figured out that MsiProperty is mainly used for passing in commandline argument TO MY msi rather than internal msi. That is not what I want to do.

EDIT2 :

I have tried Isaiah's suggestion

    <MsiProperty Name="IACCEPTSQLNCLILICENSETERMS" Value="YES"/>

But problem still persists.

After checking out the log, I found this line.

[0708:0C70][2016-06-30T08:38:48]i301: Applying execute package: SqlLocalDB.msi, action: Install, path: C:\ProgramData\Package Cache{E359515A-92E6-4FA3-A2C9-E1BA02D8DE6E}v13.0.1601.5\SqlLocalDB.msi, arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" IACCEPTSQLNCLILICENSETERMS="YES"'

Doesn't this mean I am already applying IACCEPTSQLNCLILICENSETERMS="YES"...? Why am I still not able to properly install this?

Possibly because YES is surrounded by quotations?

EDIT 3:

attempted to do

    <MsiProperty Name="IACCEPTSQLNCLILICENSETERMS=YES"/>

but it gives me compiler error.

Thank you

4

4 Answers

2
votes

Can you try this? I am not able to test this now, but I think this should work.

<MsiPackage SourceFile="SqlLocalDB.msi" Vital="yes" DisplayInternalUI="no">
    <MsiProperty Name="IACCEPTSQLNCLILICENSETERMS" Value="YES"/>
</MsiPackage>
2
votes

So I actually asked this on mailing list and got the answer.

<MsiPackage SourceFile="SqlLocalDB.msi" Vital="yes" DisplayInternalUI="no">
    <MsiProperty Name="ALLUSERS" Value="1"/>
    <MsiProperty Name="IACCEPTSQLNCLILICENSETERMS" Value="YES"/>
</MsiPackage>

Just adding ALLUSERS MsiProperty solved the issue. I wish the error indicated different message.

1
votes

WIX V4

add WixUtilExtension to your project references then add the following line inside the Wix tag

xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"

add this to check if it's already installed or not

<util:RegistrySearch Id="Sql32" Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft SQL Server Local DB\Installed Versions\12.0" Value="ParentInstance" Result="exists" Variable="Sql32"/>
<util:RegistrySearch Id="Sql64" Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft SQL Server Local DB\Installed Versions\12.0" Value="ParentInstance" Result="exists" Variable="Sql64" Win64="yes"/>

then in the Chain tag add

<MsiPackage Id="SqlLocalDB2014x32" SourceFile="..\..\Prerequisites\SqlLocalDB-x32.msi" Permanent="yes" ForcePerMachine="yes" Vital="no" DisplayInternalUI="no" InstallCondition="NOT (Sql32)">
      <MsiProperty Name="IACCEPTSQLLOCALDBLICENSETERMS" Value="YES" />
  </MsiPackage>
  <MsiPackage Id="SqlLocalDB2014x64" SourceFile="..\..\Prerequisites\SqlLocalDB-x64.msi" Permanent="yes" ForcePerMachine="yes" Vital="no" DisplayInternalUI="no" InstallCondition="NOT (Sql64)">
      <MsiProperty Name="IACCEPTSQLLOCALDBLICENSETERMS" Value="YES" />
  </MsiPackage>

The 32bit version won't work in 64bit system and it will show an error massage but the bootstrapper should continue without a problem

The program will not show up in the installed program list in the control panel and may require a restart to the system to work on windows 8 and 10 type "sqllocaldb info" in the CMD or PowerShell to make sure it does it should return the instance name normally it's "MSSQLLocalDB"

Sqllocaldb 2017 with windows 7 will have a problem unless you install dot net core sdk v2 (don't test it myself i am using sqllocaldb 2014) Error when start an instance of SQLLOCQLDB 2017 on windows 7 64bit (entry point not found except)

Don't Forget to change "SourceFile"

1
votes

Keep in mind that newer SqlLocalDB installers ask you to accept the 'sqllocaldb' license terms so add the property

<MsiProperty Name="IACCEPTSQLLOCALDBLICENSETERMS" Value="YES" />