3

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

Shintaro Takechi
  • 1,215
  • 1
  • 17
  • 39

4 Answers4

2

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>
Isaiah4110
  • 9,855
  • 1
  • 40
  • 56
2

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.

Shintaro Takechi
  • 1,215
  • 1
  • 17
  • 39
  • 1
    Don't use the ALLUSERS property. Set the `ForcePerMachine` attribute on `MsiPackage` to `yes` instead. – Sean Hall Jul 14 '16 at 16:13
  • Seems like that approach is working well. Thank you. For future reference, why is force per machine better than using all users? – Shintaro Takechi Jul 15 '16 at 21:22
  • `ALLUSERS` fundamentally changes how the package is installed, v4 won't allow those kind of properties to be set - https://github.com/wixtoolset/issues/issues/5293. – Sean Hall Jul 19 '16 at 17:51
  • Novice question: where do I put this MsiPackage tag? I want to have SqlLocalDB installed, but I don't know where to actually do so (just like the prerequisites) – paraJdox1 Aug 09 '21 at 07:29
2

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"

ahmedpio
  • 132
  • 1
  • 10
  • The only comment I have here, is that the path for the key in the registry search should be version 11.0. At least that was the case for me. – Tiger Galo Apr 14 '22 at 21:33
1

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

<MsiProperty Name="IACCEPTSQLLOCALDBLICENSETERMS" Value="YES" />
WebDrive
  • 1,248
  • 12
  • 19