none
Unable to install SSMS 2016, installation always fails

    Question

  • Hi,

    I can't install SSMS 2016 (16.5.1), because the installation always fails when it starts installing the SQL Server 2016 SQL Diagnostics package, throwing errors 0x80070643 and 2331.

    The error codes say "Unexpected error" and that the package is broken. I tried installing from the same file on a different machine (running win 7 though) and it was successfull, so the file is not corrupt. I also tried older versions of 2016 and the errors were the same.

    My machine is win 10 x64 update 1607, so .NET is probably not the issue.

    I searched allover and found no relevant solution, so any suggestion is appreciated.

    Thanks,

    mats

    Here is the relevant section of install log:

    [0DA4:11DC][2016-12-23T22:24:47]e000: BootstrapperEngineDataModel.OnError: Burn engine encountered error. PackageId: sql_diag_x64, ErrorType: WindowsInstaller, ErrorCode: 2331, Data: 2331,C:\Program Files\Microsoft SQL Server\130\Setup Bootstrap\Bin\{766BE25E-D2B5-4E76-BCB0-29B801BADB3F}sqlca.dll, ErrorMessage: The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2331. , UIHint: 0
    [0DA4:11DC][2016-12-23T22:24:47]i000: MainViewModel.AddFailedCondition: Error: SQL Server 2016 SQL Diagnostics: The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2331. 
    [0DA4:11DC][2016-12-23T22:24:47]e000: MainViewModel.OnPackageError: setup failed for packageId: sql_diag_x64, package: SQL Server 2016 SQL Diagnostics, errorCode: 2331, errorMessage: The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2331. 
    [05B8:12A4][2016-12-23T22:24:47]e000: Error 0x80070643: Failed to install MSI package.
    [05B8:12A4][2016-12-23T22:24:47]e000: Error 0x80070643: Failed to execute MSI package.
    [0DA4:11DC][2016-12-23T22:24:47]e000: Error 0x80070643: Failed to configure per-machine MSI package.
    [0DA4:11DC][2016-12-23T22:24:47]i000: MainViewModel.OnPackageAction: Install Completed for package SQL Server 2016 SQL Diagnostics
    [0DA4:11DC][2016-12-23T22:24:47]i319: Applied execute package: sql_diag_x64, result: 0x80070643, restart: None
    [0DA4:11DC][2016-12-23T22:24:47]e000: Error 0x80070643: Failed to execute MSI package.

    Friday, December 23, 2016 10:46 PM

All replies

  • Hello,

    It seems .NET Framework 3.5 is not enabled or .NET Framework needs to be repaired. Please download and run the following tool:

    https://www.microsoft.com/en-us/download/details.aspx?id=30135

     

    Hope this helps.

    Regards,

    Alberto Morillo
    SQLCoffee.com

    • Proposed as answer by FallLake Wednesday, February 1, 2017 8:37 PM
    Saturday, December 24, 2016 4:39 AM
    Moderator
  • Do you have  .NET 3.5 SP1 installed?  

    Please Mark it as Answered if it answered your question OR mark it as Helpful if it help you to solve your problem.

    Saturday, December 24, 2016 6:41 AM
  • @Alberto Morillo

    Hi thanks for this hint, but it didn't work.

    Both dotnet 3.5 and 4.6 were enabled. Repair tool found nothing to repair. I tried disabling and re-enabling both 3.5 and 4.6, but it didn't fix it either. I tried installing SSMS with both 3.5 and 4.6 disabled (one at a time), but the installation stumbled always at the same point..


    • Edited by mats wormin Sunday, December 25, 2016 3:58 PM
    Saturday, December 24, 2016 2:17 PM
  • @Vishe

    Hi, 3.5 was installed. I also reinstalled it (disabled and re-enabled with downloading source files), but the issue remains.

    I tried the solution from the post you linked, but i can't rename the folder because it's used by "svchost.exe (apphost)". It is a bit strange though, because the folder C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config is locked by svchost.exe (apphost) even if all .NET was disabled.

    This might point to something, but I don't have a clue..


    • Edited by mats wormin Sunday, December 25, 2016 3:59 PM
    Saturday, December 24, 2016 2:35 PM
  • Hi mats,

    Could you please locate and upload SSMS installation log under %TEMP%\SsmsSetup\ to OneDrive and share the link here so we can have a better understanding about the issue? 

    If you have any other questions, please let me know.

    Regards,
    Lin

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, December 26, 2016 2:38 AM
    Moderator
  • Hi mats,

    Could you please locate and upload SSMS installation log under %TEMP%\SsmsSetup\ to OneDrive and share the link here so we can have a better understanding about the issue? 

    If you have any other questions, please let me know.

    Regards,
    Lin

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Hi, thanks for pointing this out.

    I only looked into the main installation log before, but now I found, that there is a separate log for each installed package. In the log for the failing sql_diag_x64 package I found a better clue for solving the issue.

    It seems that the installer can't find a dll library because of a wrong registry entry for the installation path:

    Software\Microsoft\Microsoft SQL Server\130\Bootstrap registry key is undefined or an error occurred (Error Code: 2). Using default shell ProgramFiles folder for install directory. . . . Error loading library C:\Program Files\Microsoft SQL Server\130\Setup Bootstrap\Bin\{766BE25E-D2B5-4E76-BCB0-29B801BADB3F}sqlca.dll or finding entry point

    I found a simmilar issue, but the solution did not work.

    I've uploaded the SSMS installation log, the sql_diag_x64 log and the HKLM SQL Server registry hive for analysis.

    Any help is greatly appreciated.

    Cheers,
    mats
    Monday, December 26, 2016 8:53 PM
  • Hi mats,

    After went through the installation log, I had a feeling that the issue might related to VC 2015 runtime. In this case, I would suggest you manually re-install  VC++ 2015 runtime and try again.

    If you have any other questions, please let me know.

    Regards,
    Lin

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, December 27, 2016 3:11 AM
    Moderator
  • Hi mats,

    After went through the installation log, I had a feeling that the issue might related to VC 2015 runtime. In this case, I would suggest you manually re-install  VC++ 2015 runtime and try again.

    If you have any other questions, please let me know.

    Regards,
    Lin

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Unfortunately that didn't help either. Reinstalled both x86 and x64, but the error remains the same.

    In the log I noticed that the installer has the system folder types mismatched:

    PROPERTY CHANGE: Adding SystemDir_32 property. Its value is 'C:\WINDOWS\SysWOW64\'.
    PROPERTY CHANGE: Adding SystemDir_64 property. Its value is 'C:\WINDOWS\system32\'.

    I don't know if that is what's causing the issue, nor how to solve it. What I do know is that the main error is:

    INFO: Software\Microsoft\Microsoft SQL Server\130\Bootstrap registry key is undefined or an error occurred (Error Code: 2).  Using default shell ProgramFiles folder for install directory.
    Property(SQL): Setup Bootstrap Directory = C:\Program Files\Microsoft SQL Server\130\Setup Bootstrap\
    Property(SQL): CA DLL Path = C:\Program Files\Microsoft SQL Server\130\Setup Bootstrap\Bin\{766BE25E-D2B5-4E76-BCB0-29B801BADB3F}sqlca.dll
    0:Watson 1:2331 2:Do_LogInstallStart 3:launchFunction 4:193 5:d:\b\s2\sources\sql\setup\darwin\sqlcastub\stubredirect.cpp 6:98 7:sqlcastub.dll 8:sqlrun.msi
            Error Code: 0x800700C1 (193)
    Windows Error Text:   Source File Name: d:\b\s2\sources\sql\setup\darwin\sqlcastub\stubredirect.cpp
    Compiler Timestamp: Tue Feb  9 14:50:15 2016
         Function Name: launchFunction
    Source Line Number: 98
    DEBUG: Error 2331:  Error loading library C:\Program Files\Microsoft SQL Server\130\Setup Bootstrap\Bin\{766BE25E-D2B5-4E76-BCB0-29B801BADB3F}sqlca.dll or finding entry point 
    MSI (s) (C4!4C) [10:56:34:982]: Product: SQL Server 2016 SQL Diagnostics -- The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2331. The arguments are: C:\Program Files\Microsoft SQL Server\130\Setup Bootstrap\Bin\{766BE25E-D2B5-4E76-BCB0-29B801BADB3F}sqlca.dll, , 

    Is there a way to point the installer to the file it can't find? Or better - is there a way to skip installation of the sql_diag_x64 package when installing SSMS?

    mats

    Tuesday, December 27, 2016 3:06 PM
  • Hello,

    Try to manually uninstall SSMS using the procedure explained on the following article:

    http://jermsmit.com/uninstall-of-sql-fails-with-error-about-rsfx-driver/

    Hope this helps.



    Regards,

    Alberto Morillo
    SQLCoffee.com

    Tuesday, December 27, 2016 7:28 PM
    Moderator