SQL Server 2017 RC 2 installation fails if Visual C++ 2015 redist is already installed - by Speedbird186

Status : 


Sign in
to vote
ID 3139355 Comments
Status Active Workarounds
Type Bug Repros 5
Opened 8/12/2017 2:25:04 PM
Access Restriction Public


While trying to install SQL Server 2017 RC 2 Developer Edition on a Windows 10 clean image (VMware Workstation 12) that has Visual C++ 2015 redist (version 14.0.24215) already installed, the installation of the Database Engine Services and Full-Text and Semantic Extractions for Search components (and likely others) fails with the message:

Error installing Microsoft Visual C++ 2015 Redistributable
VS Shell installation has failed with exit code 1638.
Error code: 1638
Log file: C:\Program Files\Microsoft SQL Server\140\Setup Bootstrap\Log\20170808_231223\VCRuntime140_x64_Cpu64_1.log
Visithttps://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=14.0.900.75&EvtType=VCRuntime140_x64%40Install%400x1638 to get help on troubleshooting.

The version of the VC++ 2015 redist files in the ISO appear to be 14.0.23506.0 which is older than what's already installed.

(Also note the lack of a space after the word "Visit.")
(This also happened with RC 1.)
Sign in to post a comment.
Posted by TheBeardedLlama on 11/9/2017 at 3:42 PM
I can confirm this is an issue.
Windows 10 with latest VS2017 installed and getting the same error.
Whatever check you guys think you're doing, it's not working. It fails because a later version of the C++ redist is installed.
Posted by SWheaties on 10/26/2017 at 9:23 AM
I should add I am attempting to install RTM, not RC as the issue was first raised for.
Posted by SWheaties on 10/26/2017 at 9:21 AM
This is still a problem. Exact same scenario and problem as dag.c
attempting to implement the suggested workaround results in:
[2234:1660][2017-10-26T09:15:21]e000: Error 0x80070666: Cannot install a product when a newer version is installed.
Posted by Thomas F. Abraham on 10/10/2017 at 9:52 AM
Having this issue on SQL 2017 RTM. Clean Windows 10 machine with Visual Studio 2017 and SQL Management Studio 2017 installed prior to SQL 2017 install. The VC++ 2017 x64 and x86 runtimes are already installed, 14.11.25325.0.
Posted by Speedbird186 on 10/4/2017 at 2:10 PM
I have now run into this issue installing a second instance of SQL Server 2017 RTM on a machine where a default instance of SQL Server 2017 RTM was successfully installed.

When trying to manually install the x64 VC++ redist included on the ISO, I get the same message in the installer log: Cannot install a product when a newer version is installed. I have attached the latest VC++ log file.
Posted by Speedbird186 on 10/4/2017 at 2:06 PM
@dag.c: the Visual Studio 2017 C++ redist replaces the VS 2015 one. (That's new for 2017.)
Posted by dag.c on 10/3/2017 at 1:30 PM
This is on a recently installed computer with Windows 10, Visual Studio 2017. SQL server 2016 was installed but has been uninstalled in preparation for 2017.
I have the following redistributables in add/remove programs:
Microsoft Visual C++ 2010 x64 and x86
Microsoft Visual C++ 2013 x64 and x86
Microsoft Visual C++ 2017 x64 and x86
(ie. no 2015 redistributable visible in add/remove programs)
Posted by dag.c on 10/3/2017 at 1:20 PM
I'm unable to install SQL Server 2017 RTM today because of this bug.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64 = v14.11.25325.00
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\x64 = v14.0.23026.00
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\x86 = v14.0.23026.00
Posted by Speedbird186 on 10/2/2017 at 12:01 PM
@Andrey: I solved the problem by using a fresh operating system image... which is easy during testing :) I didn't take the time to try to figure out why VC++ redist got messed up to begin with (because I started with a clean image to for RC 2...).
Posted by Andrey Nikolov on 10/2/2017 at 10:50 AM
Still exists on SQL Server 2017 RTM. I had to uninstall Visual C++ 2017 redistributable to be able to install SQL 2017 database engine and SSIS.
Posted by Speedbird186 on 8/28/2017 at 1:46 PM
Now we're on to something... the VC++ version numbers in the WOW6432Node don't match the other one. I've attached the WOW6432Node keys also.
Posted by Microsoft on 8/24/2017 at 1:17 PM
Are the registry VC++ registry keys from 64-bit or 32-bit hive? Can you also attach the registry dump from this key:

Thank you
Posted by Speedbird186 on 8/23/2017 at 12:11 PM
1. screen shot of error message during install
2. VC++ registry keys
3. Full logs from SQL Server setup
Posted by Microsoft on 8/17/2017 at 11:03 AM

There is detection logic in sql setup and if version in "Software\Microsoft\VisualStudio\14.0\VC\Runtimes" is 14.0.23506.0 or higher the setup skips installing VC runtime. We tried installing Microsoft Visual C++ 2015 Redistributable Update 3 and then tried SQL Server 2017 RC2 and the installation worked. Can you please attach the entire setup logs folder at: C:\Program Files\Microsoft SQL Server\140\Setup Bootstrap\Log\20170808_231223 and the vc runtime registry keys at: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes