Reputation: 355
I am looking at the registry key: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\X64
The "Installed" value is 1, meaning that the Microsoft Visual C++2015-2019 Redistributable is installed on my machine.
However, after I go to "Apps & Features" in control panel and uninstall the Microsoft Visual C++2015-2019 Redistributable 14.28.29914, the value under that registry key does not change at all, the installed value is still 1.
Now my app couldn't launch due to lack of that run time(it can run before the uninstall)... I am pretty sure somewhere in the system something about that run-time has been uninstalled but what I don't know is what exactly has been removed and why the installed value under the key is still 1.
I have an installer that runs the Microsoft Visual C++ run time installer before installing my program if run-time is not present upon checking that registry key... Now it's no longer working because the registry key returns as installed while the app still fails to launch...
edit:
I even uninstalled Visual Studio 2017 and 2015(now there is no VS installed on my machine), and the installed value under Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\X64 still showed as 1
Upvotes: 5
Views: 1528
Reputation: 1397
I found this thread: https://developercommunity.visualstudio.com/t/uninstalling-visual-c-2015-2019-redistributable-do/1193755
The problem appears to be that the registry key is not removed if Visual Studio (with a C++ component) is installed on the computer.
Unfortunately, it is not clear to me why this change of behavior happens, and, since we cannot trust the registry key, how to detect if a runtime is installed or not.
Upvotes: 1