2

I have a msi installer project in VS 2015, and I have MSI dependency on vcredist_x64.exe (Redistributable package 2015). I am trying to install the pre-requiste with launch condition in installer project. But somehow the launch condition is always turning to be true so every time I click the installer it shows dialog to install vcredist_x64.exe every time even if its installed. The launch condition for windows installer project is as below snap enter image description here

and the launch condition is like below enter image description here

Can anyone help that kind of condition can be applied So that it installs prerequisite only if its unavailableenter image description here.

I have also tried adding with custom actions but that also does not work well and shows error as both MSI installer output exe and vcredist_x64.exe runs at same time, and any help is appreciated

piu
  • 195
  • 1
  • 2
  • 10

1 Answers1

0

You can do this with the Prerequisites button on the Properties of the setup project. The x64 redist is one of the choices that the setup.exe will install before running your MSI. It needs to be this way because it's MSI-based and you can't run recursive MSI installs, so you can't install it from your custom action, as you've discovered.

Can you provide a reference for the ComponentID you're using for that search? I have that runtime installed but that component id is not installed on my system.

Try one of these component ids from an inventory of my system, ids and descriptions. The minimum runtimes are the basic required ones, I assume:

{22824972-0C4A-31B4-AEEF-9FC7596F1305} Microsoft Visual C++ 2015 x64 Minimum Runtime - 14.0.23506 C:\Windows\system32\msvcp140.dll

{35B5C1D2-EB5B-3569-83EB-78E34F5C3254} : Microsoft Visual C++ 2015 x64 Minimum Runtime - 14.0.23506 C:\Windows\system32\concrt140.dll

{F5E98D96-3C7F-37D7-821F-E4BB03D4384B} Microsoft Visual C++ 2015 x64 Minimum Runtime - 14.0.23506 C:\Windows\system32\vcomp140.dll

{B33258FD-750C-3B42-8BE4-535B48E97DB4} Microsoft Visual C++ 2015 x64 Minimum Runtime - 14.0.23506 C:\Windows\system32\vcruntime140.dll

{7050289E-BECF-32C7-89DC-08C4480E482B} Microsoft Visual C++ 2015 x64 Minimum Runtime - 14.0.23506 C:\Windows\system32\vcamp140.dll

{D227D7DF-D9F8-33AF-B935-4BF2F47F2EA4} Microsoft Visual C++ 2015 x64 Minimum Runtime - 14.0.23506 C:\Windows\system32\vccorlib140.dll

PhilDW
  • 20,260
  • 1
  • 18
  • 28
  • The Component ID I used is for Visual C++ 2015 Redistributable 14.0.23026 ( VC_2015_REDIST_X64_MIN) version which I got from http://stackoverflow.com/questions/35160846/install-vcredist-x64-exe-on-install-of-vs-2015-installer-project/35161977#35161977 – piu Feb 03 '16 at 09:08
  • On Trying to install dependency from Prerequistes with download location URL which is https://www.microsoft.com/en-us/download/details.aspx?id=48145 as you suggested I see installation dialog but it fails to install with error regarding exe changed since it was initially published temp location. – piu Feb 03 '16 at 09:19
  • For finding component ID I used http://stackoverflow.com/questions/11137424/how-to-make-vcredist-x86-reinstall-only-if-not-yet-installed as reference – piu Feb 03 '16 at 09:23
  • Those guids are for older versions as far as I can tell. The ids will change for every C__ runtime release because they are different. – PhilDW Feb 03 '16 at 18:32
  • Thanks for the answer and finally I am using Prerequistes with "Download prerequisites from the same location as my application" option to install. This solved the issue for me. – piu Feb 08 '16 at 05:08