SQL SERVER – Fix: Error – VS Shell Installation Has Failed with Exit Code 1638

SQL
18 Comments

SQL SERVER - Fix: Error - VS Shell Installation Has Failed with Exit Code 1638 erroricon-800x536 Recently I got called in by a regular customer for my On Demand (50 minutes) service. Every single day I keep two hours available to help DBAs who need urgent help with SQL Server. When I connected with a customer, I was expecting to solve their SQL Server performance tuning problem. However, I quickly realized that the issue was not SQL Server Performance but was rather with SQL Server 2017 installation. Let us see how we can fix the error users are receiving related to VS Shell.

While customers were installing SQL Server 2017, they were receiving the following error:

The following error has occurred:
VS Shell installation has failed with exit code 1638.

As customers were performing this installation during their maintenance window they were really worried if the installation will be successful or not. Let us see what we did to fix their error.

Workaround / Solution

The solution to this error was very much simpler. We had to install the Microsoft Visual C++ 2017 Redistributable.

Here is the link to download the redistributables.

X64: https://go.microsoft.com/fwlink/?LinkId=746572

x86: https://go.microsoft.com/fwlink/?LinkId=746571

Once we install them and rebooted the server, the error did not show up again. I think it is very easy solutions. If you are going to install SQL Server 2017, I suggest you just install this redistrubtables before you start your SQL Server installation and you will not face any error.

Note: You have to install any one of the version x64 for 64 bit OS and x86 for 32 bit OS. Please do not try to install both on your server.

Reference: Pinal Dave (https://blog.sqlauthority.com)

SQL Download, SQL Error Messages, SQL Scripts, SQL Server, SQL Server Installation
Previous Post
SQL SERVER – Too many dumps generated. CPerIndexMetaQS::ErrorAbort – Index Corruption
Next Post
SQL SERVER – Msg 32055 – sp_refresh_log_shipping_monitor – There Was an Error Configuring the Remote Monitor Server

Related Posts

18 Comments. Leave new

  • nakulvachhrajani
    December 21, 2017 2:27 pm

    I may be mistaken, but doesn’t the setup have an option to run a pre-requisite check which does check for the runtime? It’s been a while since I setup a SQL Server from scratch, so my memory may be failing me.

    Reply
  • Thanks Pinal! You saved me from getting stuck.

    Reply
  • Thank you very much for your insight to this perplexing issue! It saved me hours of frustrating research!

    Reply
  • thanks!

    Reply
  • Hi, I had the same problem so I tried your fix. When I ran the VC_redist.x64.exe the window of this installer appeared in a very small version with text that small that is was unreadable. The buttons were recognizable, so I checked agree and clicked install. I promptly got an error which wasn’t readable as well, but recognizable was a link to an error.log. The log stated that it couldn’t be installed because there was a more recent version on the system. So the initial problem remains. :-(

    Reply
  • thank you very much Pinal

    Reply
  • Adnan Korkmaz
    June 22, 2018 8:24 pm

    I encountered the same problem in the following situation:
    1. First Installed MS visual studio 2017.
    2. Then tried to install MS SQL Server 2017 and failed with 1638 code.

    Your solution didn’t work for me, since I already had Visual C++ Redist. 2017 version installed on the computer.
    What worked was to remove 2017* and install SQL again.

    Reply
    • Agree with Adnan, I uninstalled Visual C++ Redist. 2017 and installed 2015 manually, from the SQL Server 2017 ISO. The SQL Server 2017 Setup worked then.

      Reply
  • I encountered the error although the message said it could not install C++ 2015 Redistributable.
    I was unable to manually install the 2015 version because an installation of MSVIsualStudio 2017 had superceded it with a C++ 2017 Redistributable : despite the presence of the 2017 version, the MS SQL Server instance installation was still wanting to install the 2015 version.
    Therefore i had to follow the steps advised by Adnan and Bron, whereby I had to uninstall my 2017 Redistributable and then the he MS SQL Server instance installation proceeded with no problem : and so far my VisualStudio2017 hasn’t moaned about me removing the 2017 version

    Reply
  • I had upgraded the Latest Version of Ms C++ 2017 Redistribution to over come with the error message.

    Reply
  • Thank you very much, it solved my problem.

    Reply
  • Thank you so much..It works

    Reply
  • Dave as always appreciate your work. In my case on a fresh install of SQL 2017 Enterprise Ed. I had to uninstall the isual C++ 2017 Redistributable re-install SQL and then applied the latest SQL CU19 update.

    Reply
  • Hi Dave, Thanks for this.
    it worked perfectly for me.
    Thanks for saving me my time.

    Reply

Leave a Reply