Installation of SQL Server 2017 failing with 'VS Shell installation has failed with exit code 1638'
Depending on which products were installed on the server beforehand, a SQL Server 2017 setup may fail with the following error :
TITLE: Microsoft SQL Server 2017 Setup ------------------------------ The following error has occurred: VS Shell installation has failed with exit code 1638.
Note that it could happen even after SQL Server 2017 setup was executed successfully once already. Eg. the following steps would reach the situation : install a first SQL Server 2017 instance (no error), install SSMS 17 from the Web (no error), install a 2nd instance (error 1638).
Anyway, the important thing is that situation is covered by KB 4092997 and as indicated in the KB, a simple Repair of 'Microsoft Visual C++ 2015 Redistributable (x64)' followed by a server restart should clear the problem (please check the current KB content though, as it may be updated with further details after this post is published).
We're working on making the interactive link of SQL Server setup's pop-up message a bit more useful than it is today, and the more specific situation where our very own SSMS introduces the problem is under review.