locked
SQL Server 2014 ClickOnce bootstrapper package availability RRS feed

  • Question

  • I'm looking for the SQL Server 2014 Express and LocalDB ClickOnce bootstrapper packages but can't seem to find them for download anywhere.  On my machine I have packages for SqlExpress2008R2, SqlExpress2012 and SqlLocalDB2012, probably installed with VS2013, but I'd like the newer version.

    • Moved by Sofiya Li Thursday, July 3, 2014 7:25 AM the right forum
    Tuesday, July 1, 2014 11:57 PM

Answers

  • I finally got around to making a bootstrapper package for Sql Server 2014 Express LocalDB.  If anyone is interested I've included the code below.  I haven't made a full Express package yet as I may not need it and it's a lot more work.  If anyone does use this then please let me know if you have any issues.

    1. Create a folder "SqlLocalDB2014"
    2. Inside it, create a blank text file called "product.xml" and paste the following it:
      <?xml version="1.0" encoding="utf-8"?>
      <Product xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" ProductCode="Microsoft.SqlServer.SqlLocalDB.12.0">
        <InstallChecks>
          <FileCheck
            Property="sqllocaldbVersion"
            FileName="sqlservr.exe"
            SearchPath="Microsoft SQL Server\120\LocalDB\Binn"
            SpecialFolder="ProgramFilesFolder"
          />
        </InstallChecks>
      
        <PackageFiles CopyAllPackageFiles="false">
          <PackageFile
            Name="x86\sqllocaldb.msi"
            HomeSite="sqllocaldb_32"
            PublicKey="3082010A0282010100E57C2F2D0CA9EC7AA834E04C3F7F490E0DB615AD1913DE528A26991571A962270737A5833082626C0BA3FD060D171406E6E0ADCC95960A205AA296E1E057303C5D629BC55D890CD034DFD9D8FA35EF11238BC0F9EB4AF439DA2F7110EB11B32C37A370E886173EEF2A46D08EC7B94800A137F1C7C8E7D21E6B4A2AF2C64C1D709F7CC368428E3CED811A52E33E32943D7E18F19BE44B5C11E4D6C3851E6C033073BCC9A8017D9DADD1F573F05B1A7B2F1F8B32BEB38EB53BD9F7FFF35FB3137C139357B8A05E359883A13434F2C5049FB9FE46170C91DFEF0F55F6ECCC39C96165A129EEBE11371BB76E4255C9CC35D152B303709C98349E2936A917195F0BBF0203010001"
          />
          <PackageFile
            Name="x64\sqllocaldb.msi"
            HomeSite="sqllocaldb_64"
            PublicKey="3082010A0282010100E57C2F2D0CA9EC7AA834E04C3F7F490E0DB615AD1913DE528A26991571A962270737A5833082626C0BA3FD060D171406E6E0ADCC95960A205AA296E1E057303C5D629BC55D890CD034DFD9D8FA35EF11238BC0F9EB4AF439DA2F7110EB11B32C37A370E886173EEF2A46D08EC7B94800A137F1C7C8E7D21E6B4A2AF2C64C1D709F7CC368428E3CED811A52E33E32943D7E18F19BE44B5C11E4D6C3851E6C033073BCC9A8017D9DADD1F573F05B1A7B2F1F8B32BEB38EB53BD9F7FFF35FB3137C139357B8A05E359883A13434F2C5049FB9FE46170C91DFEF0F55F6ECCC39C96165A129EEBE11371BB76E4255C9CC35D152B303709C98349E2936A917195F0BBF0203010001"
          />
        </PackageFiles>
      
        <Commands Reboot="Defer">
          <Command PackageFile="x86\sqllocaldb.msi" Arguments="IACCEPTSQLLOCALDBLICENSETERMS=YES" EstimatedInstallSeconds="90">
            <InstallConditions>
              <FailIf Property="VersionNT" Compare="ValueNotExists" String="InvalidPlatformOS" />
              <FailIf Property="VersionNT" Compare="VersionLessThan" Value="6.0.1" String="InvalidPlatformOS" />
              <FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired" />
              <BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="Intel" />
              <BypassIf Property="sqllocaldbVersion" Compare="VersionGreaterThanOrEqualTo" Value="2014.120.2000.8" />
            </InstallConditions>
            <ExitCodes>
              <ExitCode Value="0" Result="Success" />
              <ExitCode Value="1641" Result="SuccessReboot" />
              <ExitCode Value="3010" Result="SuccessReboot" />
              <DefaultExitCode Result="Fail" String="GeneralFailure" FormatMessageFromSystem="true" />
            </ExitCodes>
          </Command>
          <Command PackageFile="x64\sqllocaldb.msi" Arguments="IACCEPTSQLLOCALDBLICENSETERMS=YES" EstimatedInstallSeconds="90">
            <InstallConditions>
              <BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="amd64" />
              <BypassIf Property="sqllocaldbVersion" Compare="VersionGreaterThanOrEqualTo" Value="2014.120.2000.8" />
            </InstallConditions>
            <ExitCodes>
              <ExitCode Value="0" Result="Success" />
              <ExitCode Value="1641" Result="SuccessReboot" />
              <ExitCode Value="3010" Result="SuccessReboot" />
              <DefaultExitCode Result="Fail" String="GeneralFailure" FormatMessageFromSystem="true" />
            </ExitCodes>
          </Command>
        </Commands>
      </Product>
    3. Create another folder "en" within the first folder.
    4. Inside the "en" folder create a blank text file "package.xml" and paste the following:
      <?xml version="1.0" encoding="utf-8"?>
      <Package Name="DisplayName" LicenseAgreement="Eula.txt" Culture="Culture" xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper">
        <PackageFiles>
          <PackageFile Name="Eula.txt" />
        </PackageFiles>
        <Strings>
          <String Name="Culture">en</String>
          <String Name="DisplayName">SQL Server 2014 Express LocalDB</String>
          <String Name="sqllocaldb_32">http://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/LocalDB%2032BIT/SqlLocalDB.msi</String>
          <String Name="sqllocaldb_64">http://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/LocalDB%2064BIT/SqlLocalDB.msi</String>
          <String Name="AdminRequired">You do not have the permissions required to install SQL Server 2014 Express LocalDB. Please contact your administrator.</String>
          <String Name="GeneralFailure">An error occurred attempting to install SQL Server 2014 Express LocalDB.</String>
          <String Name="InvalidPlatformOS">The current operating system version does not support SQL Server 2014 Express LocalDB.</String>
          <String Name="InvalidPlatformOSServicePack">The current operating system does not meet Service Pack level requirements for SQL Server 2014 Express LocalDB. Install the most recent Service Pack from the Microsoft download center at http://www.microsoft.com/downloads before continuing setup.</String>
        </Strings>
      </Package>
    5. Copy the "C:\Program Files\Microsoft SQL Server\120\License Terms\License_SqlLocalDB_1033.txt" file into the "en" folder and rename it to "eula.txt".
    6. To install the package copy the folder to where your other bootstrapper packages are located e.g. "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\Bootstrapper\Packages"
    7. As usual you'll also need to download the install files if you wish to include the component together with your installer rather than downloading from MS. The two msi files will need to be put in "x64" and "x86" folders.



    • Marked as answer by Barry Wang Thursday, August 7, 2014 7:10 AM
    • Edited by kjbartel Thursday, August 7, 2014 7:36 AM
    Thursday, August 7, 2014 2:40 AM
  • I've uploaded all the files to GitHub so people don't have to create them themselves. Included is both the original version and an updated version for SP1.
    • Marked as answer by kjbartel Tuesday, August 4, 2015 5:35 AM
    Tuesday, August 4, 2015 5:34 AM

All replies

  • Hi Kjbartel,

    According to your description, since the issue regards ClickOnce and Setup & Deployment Projects Forum, I will help you move your thread to the related forum at http://social.msdn.microsoft.com/Forums/windows/en-US/home?forum=winformssetup.

    It is appropriate and more experts will assist you. Thanks for your understanding.

    Regards,
    Sofiya Li

    If you have any feedback on our support, please click here.


    Sofiya Li
    TechNet Community Support

    Thursday, July 3, 2014 7:24 AM
  • Hello kjbartel,

    The ClickOnce bootstrapper pacakge is not available for download as far as I know. It is the options in ClickOnce prerequisite options and you can custom them yourself. And those packages will be located in folders like "\Program Files\Microsoft SDKs\Windows\v8.0A\Bootstrapper"

    Since Viusal Studio does not provide this option in 2013 version. I'm afraid you may have to create it yourself by refer to here

    http://msdn.microsoft.com/en-us/library/ms165429.aspx

    Regards,



    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, July 3, 2014 7:59 AM
  • Hi Barry,

    Yes I did consider trying to make my own packages based on the 2012 version packages.  There are a few problems with this though:

    • I don't know what the public key is for the package files (is there a way to find this or is it even needed?)
    • 2012 uses a "SQLExpressChk.exe" tool, with the version number and culture as arguments, which is then used to check install conditions. Not really sure exactly what or how it's checking so it'd be hard for me to replicate this.
    • The installer itself has lots of exit codes which are checked, they may be the same as 2012 or maybe not.
    • EstimatedInstalledBytes and ExtimatedInstallSeconds?  Probably not that important but.....
    • I don't have the download links used for packages which usually use Microsoft's go fwlink urls.  If the download location doesn't change it's fine but there's no guarantee of that.
    • 2012 version of LocalDB also includes sqlncli and sqlcmdlnutils. Not sure if they're really needed, perhaps they are included in the SqlLocalDB.msi available through the SQL Server Express 2012 download page.

    Overall I thought it would be better to just try and find the proper bootstrapper package from MS.  I even installed the VS 14 CTP on a virtual machine to see if it included it, but no, even though SQL Server Express 2014 is installed a new bootstrapper package hasn't been included.  Guessing they haven't made one yet.

    Friday, July 4, 2014 1:08 AM
  • Just to save anyone else the trouble, I can confirm it is not available in VS 2014 CTP 2 either.

    Thursday, July 10, 2014 5:11 PM
  • Hi kjbartel,

    It seems I missed this case. Sorry for that.

    >>I don't have the download links used for packages which usually use Microsoft's go fwlink urls.

    Yes I went to have a test and didn't find a specific download link like before.

    >> don't know what the public key is for the package files (is there a way to find this or is it even needed?)

    Since manifest file use GUID to match files, I think it is required. To see details, you may manually install it and refer to this case http://stackoverflow.com/questions/5063129/how-to-find-the-upgrade-code-productcode-of-an-installed-application-in-win-7

    Or a tool is available from here:http://blogs.msdn.com/b/astebner/archive/2005/07/01/using-msiinv-to-gather-information-about-what-is-installed-on-a-computer.aspx

    Well, the steps seems really a little complex for us.

    Do you mind to add a report here:

    https://visualstudio.uservoice.com/forums/121579-visual-studio

    I believe its a good uservoice report.

    Regards,



    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, July 15, 2014 12:28 PM
  • Hi Barry,

    As advised I've posted the idea on visualstudio.uservoice.com.  Not sure if it will be looked at if no one votes for it though so that seems like a bit of a dead end.

    Where this sort of request / issue should be raised really isn't clear.  I mean is it the responsibility of the SQL server team to release the package or the visual studio team?  I would have thought the SQL server team as it's their product and it is released separately to Visual Studio.  And should it be asked here in this forum or in UserVoice?  It's now been raised in two forums and uservoice.

    Actually I don't understand why bootstrapper packages aren't released through the normal Visual Studio 'Extensions and Updates', or even through nuget.  That would seem like the logical place to release this sort of stuff wouldn't it?

    As it currently stands Sql Server 2014 Express LocalDB effectively can't be used as there is no easy way to deploy it along with an application.  There isn't even a boostrapper package for Sql Server 2012 SP1 Express LocalDB.  I'd be required to use the original release of Sql Server 2012 Express LocalDB.

    - Kuan

    Friday, July 18, 2014 5:06 AM
  • Hi Kuan,

    Since it is a cross product support I'm not so sure either. But Visual Studio User Voice in my mind is the right place.

    "Actually I don't understand why bootstrapper packages aren't released through the normal Visual Studio 'Extensions and Updates', or even through nuget.  That would seem like the logical place to release this sort of stuff wouldn't it?"

    I do not have that right to say anything about the design of VS. But I agree that the prerequisites should use some convenient way to release, that's better.

    If ClickOnce is not so fit, I recommend you consider use InstallShield or Wix. They have more functions in deployment.

    As a alterative way, maybe you can keep the LocalDB file in your setup. I read this page http://www.microsoft.com/en-hk/download/details.aspx?id=42299 and it seems LocalDB msi is not so huge.

    Best regards, :)



    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by Barry Wang Friday, July 25, 2014 6:53 AM
    Friday, July 25, 2014 6:53 AM
  • Hi Barry,

    If ClickOnce is not so fit, I recommend you consider use InstallShield or Wix.


    I won't touch Installshield but I have been considering WiX. WiX would require a lot more work though, much more work than creating a bootstrapper package for LocalDB.

    As a alterative way, maybe you can keep the LocalDB file in your setup.


    Including the LocalDB setup file in the setup still requires a bootstrapper package to be created and then the "Download prerequisites from the same location as my application" option selected. Won't have to worry about a download url though.

    Monday, July 28, 2014 6:53 AM
  • @kjbartel Wix is reasonable, Visual Studio Setup itself is using Wix and it is free.

    >>Including the LocalDB setup file in the setup still requires a bootstrapper package to be created

    Sorry, forgot that, thanks for the reminder.

    Regards, 



    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, July 28, 2014 10:20 AM
  • I finally got around to making a bootstrapper package for Sql Server 2014 Express LocalDB.  If anyone is interested I've included the code below.  I haven't made a full Express package yet as I may not need it and it's a lot more work.  If anyone does use this then please let me know if you have any issues.

    1. Create a folder "SqlLocalDB2014"
    2. Inside it, create a blank text file called "product.xml" and paste the following it:
      <?xml version="1.0" encoding="utf-8"?>
      <Product xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" ProductCode="Microsoft.SqlServer.SqlLocalDB.12.0">
        <InstallChecks>
          <FileCheck
            Property="sqllocaldbVersion"
            FileName="sqlservr.exe"
            SearchPath="Microsoft SQL Server\120\LocalDB\Binn"
            SpecialFolder="ProgramFilesFolder"
          />
        </InstallChecks>
      
        <PackageFiles CopyAllPackageFiles="false">
          <PackageFile
            Name="x86\sqllocaldb.msi"
            HomeSite="sqllocaldb_32"
            PublicKey="3082010A0282010100E57C2F2D0CA9EC7AA834E04C3F7F490E0DB615AD1913DE528A26991571A962270737A5833082626C0BA3FD060D171406E6E0ADCC95960A205AA296E1E057303C5D629BC55D890CD034DFD9D8FA35EF11238BC0F9EB4AF439DA2F7110EB11B32C37A370E886173EEF2A46D08EC7B94800A137F1C7C8E7D21E6B4A2AF2C64C1D709F7CC368428E3CED811A52E33E32943D7E18F19BE44B5C11E4D6C3851E6C033073BCC9A8017D9DADD1F573F05B1A7B2F1F8B32BEB38EB53BD9F7FFF35FB3137C139357B8A05E359883A13434F2C5049FB9FE46170C91DFEF0F55F6ECCC39C96165A129EEBE11371BB76E4255C9CC35D152B303709C98349E2936A917195F0BBF0203010001"
          />
          <PackageFile
            Name="x64\sqllocaldb.msi"
            HomeSite="sqllocaldb_64"
            PublicKey="3082010A0282010100E57C2F2D0CA9EC7AA834E04C3F7F490E0DB615AD1913DE528A26991571A962270737A5833082626C0BA3FD060D171406E6E0ADCC95960A205AA296E1E057303C5D629BC55D890CD034DFD9D8FA35EF11238BC0F9EB4AF439DA2F7110EB11B32C37A370E886173EEF2A46D08EC7B94800A137F1C7C8E7D21E6B4A2AF2C64C1D709F7CC368428E3CED811A52E33E32943D7E18F19BE44B5C11E4D6C3851E6C033073BCC9A8017D9DADD1F573F05B1A7B2F1F8B32BEB38EB53BD9F7FFF35FB3137C139357B8A05E359883A13434F2C5049FB9FE46170C91DFEF0F55F6ECCC39C96165A129EEBE11371BB76E4255C9CC35D152B303709C98349E2936A917195F0BBF0203010001"
          />
        </PackageFiles>
      
        <Commands Reboot="Defer">
          <Command PackageFile="x86\sqllocaldb.msi" Arguments="IACCEPTSQLLOCALDBLICENSETERMS=YES" EstimatedInstallSeconds="90">
            <InstallConditions>
              <FailIf Property="VersionNT" Compare="ValueNotExists" String="InvalidPlatformOS" />
              <FailIf Property="VersionNT" Compare="VersionLessThan" Value="6.0.1" String="InvalidPlatformOS" />
              <FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired" />
              <BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="Intel" />
              <BypassIf Property="sqllocaldbVersion" Compare="VersionGreaterThanOrEqualTo" Value="2014.120.2000.8" />
            </InstallConditions>
            <ExitCodes>
              <ExitCode Value="0" Result="Success" />
              <ExitCode Value="1641" Result="SuccessReboot" />
              <ExitCode Value="3010" Result="SuccessReboot" />
              <DefaultExitCode Result="Fail" String="GeneralFailure" FormatMessageFromSystem="true" />
            </ExitCodes>
          </Command>
          <Command PackageFile="x64\sqllocaldb.msi" Arguments="IACCEPTSQLLOCALDBLICENSETERMS=YES" EstimatedInstallSeconds="90">
            <InstallConditions>
              <BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="amd64" />
              <BypassIf Property="sqllocaldbVersion" Compare="VersionGreaterThanOrEqualTo" Value="2014.120.2000.8" />
            </InstallConditions>
            <ExitCodes>
              <ExitCode Value="0" Result="Success" />
              <ExitCode Value="1641" Result="SuccessReboot" />
              <ExitCode Value="3010" Result="SuccessReboot" />
              <DefaultExitCode Result="Fail" String="GeneralFailure" FormatMessageFromSystem="true" />
            </ExitCodes>
          </Command>
        </Commands>
      </Product>
    3. Create another folder "en" within the first folder.
    4. Inside the "en" folder create a blank text file "package.xml" and paste the following:
      <?xml version="1.0" encoding="utf-8"?>
      <Package Name="DisplayName" LicenseAgreement="Eula.txt" Culture="Culture" xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper">
        <PackageFiles>
          <PackageFile Name="Eula.txt" />
        </PackageFiles>
        <Strings>
          <String Name="Culture">en</String>
          <String Name="DisplayName">SQL Server 2014 Express LocalDB</String>
          <String Name="sqllocaldb_32">http://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/LocalDB%2032BIT/SqlLocalDB.msi</String>
          <String Name="sqllocaldb_64">http://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/LocalDB%2064BIT/SqlLocalDB.msi</String>
          <String Name="AdminRequired">You do not have the permissions required to install SQL Server 2014 Express LocalDB. Please contact your administrator.</String>
          <String Name="GeneralFailure">An error occurred attempting to install SQL Server 2014 Express LocalDB.</String>
          <String Name="InvalidPlatformOS">The current operating system version does not support SQL Server 2014 Express LocalDB.</String>
          <String Name="InvalidPlatformOSServicePack">The current operating system does not meet Service Pack level requirements for SQL Server 2014 Express LocalDB. Install the most recent Service Pack from the Microsoft download center at http://www.microsoft.com/downloads before continuing setup.</String>
        </Strings>
      </Package>
    5. Copy the "C:\Program Files\Microsoft SQL Server\120\License Terms\License_SqlLocalDB_1033.txt" file into the "en" folder and rename it to "eula.txt".
    6. To install the package copy the folder to where your other bootstrapper packages are located e.g. "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\Bootstrapper\Packages"
    7. As usual you'll also need to download the install files if you wish to include the component together with your installer rather than downloading from MS. The two msi files will need to be put in "x64" and "x86" folders.



    • Marked as answer by Barry Wang Thursday, August 7, 2014 7:10 AM
    • Edited by kjbartel Thursday, August 7, 2014 7:36 AM
    Thursday, August 7, 2014 2:40 AM
  • I‘v vote for you and will mark this case as the answer. Then others will see the answer directly.

    Thanks for your contribution on this case. :)



    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, August 7, 2014 7:10 AM
  • Well it's not exactly the answer as it is only for the LocalDB package and not the full Express package.  As I said earlier, the old 2012 package uses a "SQLExpressChk.exe" tool for checking installed version and who knows what else.  I could guess what it is checking but there's no way to know 100%.  The SQL Server Express installer is also not an MSI so I can't even open it up in Orca to look at what install conditions it's using.  So, I'd still like an official SQL Server 2014 Express ClickOnce package.
    Thursday, August 7, 2014 7:32 AM
  • Thanks for your support @ it's very helpful for all developers that want to include localdb 2014 in setup project
    Thursday, August 7, 2014 6:07 PM
  • Thanks. It works.
    Tuesday, August 26, 2014 1:00 PM
  • The solution provided by kjbartel does not seems to work in some cases as ProgramFilesFolder might refer to x86 version of the Program Files folder. As such, I have replaced the InstallCheck with the following:

      <InstallChecks>
        <RegistryFileCheck
          Property="sqllocaldbVersion"
          Key="HKLM\SOFTWARE\Microsoft\Microsoft SQL Server Local DB\Installed Versions\12.0"
          Value="InstanceAPIPath"
        />
      </InstallChecks>

    Friday, November 21, 2014 8:41 PM
  • Dear Sir/madam

    The file from this path can not be use.
    http://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/LocalDB%2064BIT/SqlLocalDB.msi

    Could I please ask what is the full download path for SP1??

    Thanks, 
    Tako


    Tako Chuang, Aloways learning......

    Tuesday, July 21, 2015 11:52 PM
  • Download links for SQL Server LocalDB SP1:

    32-bit - http://download.microsoft.com/download/1/5/6/156992E6-F7C7-4E55-833D-249BD2348138/ENU/x86/SqlLocalDB.msi

    64-bit - http://download.microsoft.com/download/1/5/6/156992E6-F7C7-4E55-833D-249BD2348138/ENU/x64/SqlLocalDB.msi

    I got these by downloading from the download center in Chrome and opening the download manager to see where the files were coming from. It is possible the links will stop working in the future, but so far the non-SP1 links have worked well.

    • Proposed as answer by Tako Chuang Thursday, July 23, 2015 1:14 AM
    Wednesday, July 22, 2015 12:56 PM
  • Thanks a lot.

    Tako Chuang, Aloways learning......

    Thursday, July 23, 2015 1:19 AM
  • Thanks a lot Joe,

    Could I please ask a further question, where can I find the PublicKey for both files??

    Cheers,
    Tako


    Tako Chuang, Aloways learning......

    Thursday, July 23, 2015 1:43 AM
  • You can get the public key as described on this thread:

    Right-click on the executable (download it from the Homesite location first), and view the Properties. Go to the Digital Signatures tab, and hit the Details button. Hit the View Certificate button in the next dialog which comes up, go to the Details Tab, and move to the Public Key. Paste the value in there into the xml file (removing all spaces).

    It looks like the public key of 2014 SP1 is the same as the public key of the older versions.

    Thursday, July 23, 2015 12:43 PM
  • Thanks Joe,

    The Public key for 2014 SP1 are

    x86  "3082010a0282010100c2ded6cfe2b77f1165ffb363a9f372b9f124eb5fa41cb24459eb6f9cfb70db65699aab90315effde2b6411f5ed6ce9002182c390cc8219a3e39963658abdd3d5fb20a3e0197fb88d3c6afec8128de5d339ef4d4e3e86964c11b111849b2798883b2dd47d18f305e0ad4b043e437519e646c48c9ddb89d82487bef44727bf6d8ddc78b9c365a16f37eabc71a69dac8e8f8d88917ea83725d98124a988f46346eabb20c9012fd88e0cd9d9ede036fb64684dfc422f9120a9089a284a47a8f0fed9b27afdd8e83801bc8145ab3ae81a2add39833f07dbd8e18ffc392c369e019fef6877c8786f3ef820ff961a10bef1aad0619ea89a84bf3eaeafca0a59e58d8b050203010001"

    x64

    "3082010a0282010100c2ded6cfe2b77f1165ffb363a9f372b9f124eb5fa41cb24459eb6f9cfb70db65699aab90315effde2b6411f5ed6ce9002182c390cc8219a3e39963658abdd3d5fb20a3e0197fb88d3c6afec8128de5d339ef4d4e3e86964c11b111849b2798883b2dd47d18f305e0ad4b043e437519e646c48c9ddb89d82487bef44727bf6d8ddc78b9c365a16f37eabc71a69dac8e8f8d88917ea83725d98124a988f46346eabb20c9012fd88e0cd9d9ede036fb64684dfc422f9120a9089a284a47a8f0fed9b27afdd8e83801bc8145ab3ae81a2add39833f07dbd8e18ffc392c369e019fef6877c8786f3ef820ff961a10bef1aad0619ea89a84bf3eaeafca0a59e58d8b050203010001"


    Tako Chuang, Aloways learning......

    Thursday, July 23, 2015 10:45 PM
  • Yes you're right that if the installer is an x86 installer run on an x64 OS then the check will fail to find the previous install. Your version work as that file is installed in both the x86 and x64 Program Files and registry locations. Unfortunately though the SqlUserInstance.dll file isn't updated in SP1 which means it can't be used as a check for subsequent updates as the version number is incorrect.

    I looked at the SqlLocalDB2012 package and saw that they in fact used "Program Files" under the "WindowsVolume" rather than the "ProgramFilesFolder". This will correctly find the file however I think it may fail on some localized versions of Windows which use a localized name for the "Program Files" directory. I can live with this as I provide the msi along with my app and the msi when run will simply exit if it detects a previous install.

    This is what I'm currently using:
    <InstallChecks>
      <!-- Check if already installed -->
      <FileCheck
        Property="sqllocaldbVersion"
        FileName="sqlservr.exe"
        SearchPath="Microsoft SQL Server\120\LocalDB\Binn"
        SpecialFolder="ProgramFilesFolder"
      />
      <!-- Check for x64 install from x86 installer -->
      <FileCheck
        Property="sqllocaldbVersion_x64"
        FileName="sqlservr.exe"
        SearchPath="Program Files\Microsoft SQL Server\120\LocalDB\Binn"
        SpecialFolder="WindowsVolume"
      />
    </InstallChecks>

    Tuesday, August 4, 2015 1:20 AM
  • I've uploaded all the files to GitHub so people don't have to create them themselves. Included is both the original version and an updated version for SP1.
    • Marked as answer by kjbartel Tuesday, August 4, 2015 5:35 AM
    Tuesday, August 4, 2015 5:34 AM
  • Thanks Kjbartel,

    This is useful. will try it.


    Tako Chuang, Aloways learning......

    Thursday, August 13, 2015 11:37 PM