This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Visual C++ 2015 redistributable kept installing...
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Aug 28, 2016
01:19 AM
VC++ 2015 redistributable runs again on the same computer
I added Microsoft Visual C++ 2015 Redistributable Package to my InstallShield project. Redistributables for VS 2015 Update 3 are downloaded from Microsoft WEB site. Generally, it works, but I have two problems:
1. After prerequisite is installed, InstallShield reports that installation failed.
2. When setup is running on computer which already has this prerequisite, it is executed again.
Problem 1 is partially solved by setting this Behavior property:
If, after installing the prerequisite, the conditions still indicate it is required - Continue the setup.
Some problems in conditions? I have OS conditions (Windows 7 - Windows 10), and one Registry condition. x64:
A registry key has a specified version value
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\VC\Servicing\14.0\RuntimeMinimum
UpdateVersion
14.0.23026
Run the prerequisite if: Data on target system is not equal to specified data
x86:
A registry key does or does not exist
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A2563E55-3BEC-3828-8D67-E5E8B9E8B675}
Run this prerequisite: If the specified registry key DOES NOT EXIST
Edit: This incorrect behavior is reproduced on Windows 10 OS. On Windows 7 it seems to work as expected, if VS++ 2015 runtime already installed, setup doesn't ask to install it again.
1. After prerequisite is installed, InstallShield reports that installation failed.
2. When setup is running on computer which already has this prerequisite, it is executed again.
Problem 1 is partially solved by setting this Behavior property:
If, after installing the prerequisite, the conditions still indicate it is required - Continue the setup.
Some problems in conditions? I have OS conditions (Windows 7 - Windows 10), and one Registry condition. x64:
A registry key has a specified version value
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\VC\Servicing\14.0\RuntimeMinimum
UpdateVersion
14.0.23026
Run the prerequisite if: Data on target system is not equal to specified data
x86:
A registry key does or does not exist
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A2563E55-3BEC-3828-8D67-E5E8B9E8B675}
Run this prerequisite: If the specified registry key DOES NOT EXIST
Edit: This incorrect behavior is reproduced on Windows 10 OS. On Windows 7 it seems to work as expected, if VS++ 2015 runtime already installed, setup doesn't ask to install it again.
(6) Replies
‎Aug 31, 2016
11:37 AM
I had the same issue. The Visual C++ 2015 run-time would install every time I ran my application's install. Most of the time with error code 1638. What I found out is that there is a newer version of the Visual C++ 2015 run-time that goes along with Visual Studio 2015 update 2. Yes, I was originally checking for 14.0.23026 but it turns out, the version was 14.0.24210.
I cloned the canned InstallShield prerequisite for the Visual C++ 2015 redistributable, calling it update 3. And instead of checking for a GUID in the Uninstall section of the registry, I changed the condition to match its x64 counterpart.
A registry key has a specified version value
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\VC\Servicing\14.0\RuntimeMinimum
UpdateVersion
14.0.24210
Run this prerequisite if: Data on target system is less than specified data
Check the following registry location on a 64-bit system: I selected Default
Hope this helps. Any questions, please feel free to e-mail me at mta@qvii.com with InstallShield in the Subject line. Thanks!
Matthew
P.S. Make sure you get the latest Visual C++ 2015 redistributable from MSDN too!
I cloned the canned InstallShield prerequisite for the Visual C++ 2015 redistributable, calling it update 3. And instead of checking for a GUID in the Uninstall section of the registry, I changed the condition to match its x64 counterpart.
A registry key has a specified version value
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\VC\Servicing\14.0\RuntimeMinimum
UpdateVersion
14.0.24210
Run this prerequisite if: Data on target system is less than specified data
Check the following registry location on a 64-bit system: I selected Default
Hope this helps. Any questions, please feel free to e-mail me at mta@qvii.com with InstallShield in the Subject line. Thanks!
Matthew
P.S. Make sure you get the latest Visual C++ 2015 redistributable from MSDN too!
‎Sep 01, 2016
06:46 AM
Thank you, the problem is solved.
‎Sep 12, 2017
04:06 AM
Hi,
I have the same problem. Can you please explain how did you handeled Visual C++ 2015 redistributable condition for x86?
Thanks.
I have the same problem. Can you please explain how did you handeled Visual C++ 2015 redistributable condition for x86?
Thanks.
MattQVI wrote:
I had the same issue. The Visual C++ 2015 run-time would install every time I ran my application's install. Most of the time with error code 1638. What I found out is that there is a newer version of the Visual C++ 2015 run-time that goes along with Visual Studio 2015 update 2. Yes, I was originally checking for 14.0.23026 but it turns out, the version was 14.0.24210.
I cloned the canned InstallShield prerequisite for the Visual C++ 2015 redistributable, calling it update 3. And instead of checking for a GUID in the Uninstall section of the registry, I changed the condition to match its x64 counterpart.
A registry key has a specified version value
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\VC\Servicing\14.0\RuntimeMinimum
UpdateVersion
14.0.24210
Run this prerequisite if: Data on target system is less than specified data
Check the following registry location on a 64-bit system: I selected Default
Hope this helps. Any questions, please feel free to e-mail me at mta@qvii.com with InstallShield in the Subject line. Thanks!
Matthew
P.S. Make sure you get the latest Visual C++ 2015 redistributable from MSDN too!
‎Nov 06, 2017
02:17 PM
I've had so many issues with installing the VC++ runtime it's not even funny. The registry check will work in all scenarios EXCEPT where you have to install both 32-bit and 64-bit VC++ 2015 runtime on the same machine (because installing the 64-bit runtime adds the registry entry to BOTH sides of the registry, 32-bit and 64-bit locations). In addtion, because MS has made it so difficult to determine when the runtime is installed, many app vendors are choosing to instead bundle the msvcp140.dll with their own installations and COPY it to the system folder (which is technically a violation of the Visual Studio license - but they're doing it anyway). In that scenario, the Flexera provided pre-requisite won't work (because it's keying off finding the correct version of msvcp140.dll).
Also keep in mind that VC++ runtime only installs the Microsoft Universal CRT (universal common run time) files if the target system meets the minimum requirements for the UCRT (as described here). I also don't think vc_redist.exe fails when running silently and the UCRT isn't installed.
I think your best bet is to determine exactly what runtime files your installation and/or application needs to run (in my case, it's both msvcp140.dll and mfc140u.dll) and then have the pre-requisite get installed if ANY of the files are missing OR if the registry entry is missing. Also make sure you copy the OS checks from the Flexera provided pre-requisite for VC++ 2015 so you know the target system is meeting the minimum requirements for it). I now have 6 separate pre-requites added to my InstallShield project (3 for 32-bit and 3 for 64-bit). One checks for the correct version of msvcp140.dll, one checks for the correct version of mfc140u.dll, and one checks for the registry value.
Now the only issue I'm seeing is that the setup prerequisite dialog keeps showing up every now and again despite the fact that I have the "The prerequisite should be hidden from the installation list" option checked for each of the prerequisites. However, this seems to only be happening on Windows Server 2008 (non-R2) systems (so far anyway) so I'm OK with it.
Also keep in mind that VC++ runtime only installs the Microsoft Universal CRT (universal common run time) files if the target system meets the minimum requirements for the UCRT (as described here). I also don't think vc_redist.exe fails when running silently and the UCRT isn't installed.
I think your best bet is to determine exactly what runtime files your installation and/or application needs to run (in my case, it's both msvcp140.dll and mfc140u.dll) and then have the pre-requisite get installed if ANY of the files are missing OR if the registry entry is missing. Also make sure you copy the OS checks from the Flexera provided pre-requisite for VC++ 2015 so you know the target system is meeting the minimum requirements for it). I now have 6 separate pre-requites added to my InstallShield project (3 for 32-bit and 3 for 64-bit). One checks for the correct version of msvcp140.dll, one checks for the correct version of mfc140u.dll, and one checks for the registry value.
Now the only issue I'm seeing is that the setup prerequisite dialog keeps showing up every now and again despite the fact that I have the "The prerequisite should be hidden from the installation list" option checked for each of the prerequisites. However, this seems to only be happening on Windows Server 2008 (non-R2) systems (so far anyway) so I'm OK with it.
‎Apr 18, 2018
09:57 AM
After I did what I mentioned earlier, I ended up modifying the Visual C++ 2015 x86 run-time again.
In Conditions, I created a new File Exists with a particular version. [SystemFolder]msvcp140.dll and the version to match 14.0.24212.0. Set it to run if the file's version is LESS THAN the version I specified. I also had a Registry Entry has certain version value. The registry key name to check was the key to differentiate between the 32-bit and 64-bit version of this run-time! Since this is x86, I used HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{37B55901-995A-3650-80B1-BBFD047E2911}. The registry value name to check is DisplayVersion and just like before, the version is 14.0.24212. Set it to run if data on target system is less than specified data and made sure Default was selected.
Hope this helps!
In Conditions, I created a new File Exists with a particular version. [SystemFolder]msvcp140.dll and the version to match 14.0.24212.0. Set it to run if the file's version is LESS THAN the version I specified. I also had a Registry Entry has certain version value. The registry key name to check was the key to differentiate between the 32-bit and 64-bit version of this run-time! Since this is x86, I used HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{37B55901-995A-3650-80B1-BBFD047E2911}. The registry value name to check is DisplayVersion and just like before, the version is 14.0.24212. Set it to run if data on target system is less than specified data and made sure Default was selected.
Hope this helps!