You may receive the following error while installing MSSQL 2017 on Windows 2012 R2 Server.
vs shell installation has failed with exit code 1638
This error occurs because Visual Studio 2017 already installed before the SQL Server installation.
- Go to Control Panel >> Programme >> Programme and Features.
- Uninstall the Microsoft Visual C++ 2017 Redistributable (x86) and (x64) as per the below screen capture.
- Try to install the SQL Server again.
- You must select the Database Engine Services while installation of SQL Server without fail.
     Installation should be completed without any issue.
    Â
- Now, Reinstall the Microsoft Visual C++ 2017 Redistributable (x86) and (x64).