Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Installing VS 2015 redistributables with InstallShield 2011


Best Answer garyflet , 31 October 2016 - 21:41

Since prerequisites don't work for me (as far as I can tell), I went back to looking at Merge modules and found a way. On the redistributables page, the 14.0 CRT and MFC merge modules are listed, but clicking the corresponding check boxes doesn't get them into the install, at least for InstallShield 2011. I had to right click on the page and noticed the option, "Browse for merge module...". Since I know that the modules exist in C:\program files (x86)\Common Files\Merge Modules I was able to select them. Then the appropriate checkboxes on the page were automatically checked and the install automatically installed the 2015 redistributables, allowing our software to run. Actually, I like this better than using the redistributable package as a prerequisite: There is no extra dialog asking to install the prerequisites and no redistributable install package to run. It's all done silently and automatically. This is the answer to the original post. What a relief!

Thanks,
Gary Go to the full post


11 replies to this topic

garyflet

garyflet
  • Full Members
  • 36 posts

Posted 24 October 2016 - 21:29

What's the best way to install Visual Studio 2015 redistributables (MFC) using InstallShield 2011?  Is it possible to use the merge modules found in C:\program files (x86)\Common Files\Merge Modules?  (Using Windows 7).  If so, how does one incorporate them into the install?

 

Thanks,

Gary



deramor

deramor
  • Full Members
  • 187 posts

Posted 24 October 2016 - 21:33

I prefer to install the redistributable package from Microsoft.  Last I heard, the Merge Modules were going away.  You can package it as a install prerequisite.  You may need to make your own prerequisite since 2015 c/c++ libraries are newer than IS2011.



garyflet

garyflet
  • Full Members
  • 36 posts

Posted 25 October 2016 - 18:05

Thanks a lot for your reply.  What about the uninstall?  Perhaps the redistributable package has an uninstall option, but I doubt if InstallShield will know how to implement it.  Maybe we don't care if redistributables are uninstalled?

 

Thanks again,

Gary



deramor

deramor
  • Full Members
  • 187 posts

Posted 25 October 2016 - 18:12

I never remove prerequisite components that are redistributable packages like the C runtime or .Net framework.  They could be used for some other app that you are not responsible for.

 

If you had to do it under very controlled circumstances, you can do so by looking through the registry, finding the guid under HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall and executing the UninstallString.  This is the command that is run by the ARP window when you attempt to remove an installed app.  Again though, this should be discouraged unless you are sure you won't break anything.



garyflet

garyflet
  • Full Members
  • 36 posts

Posted 25 October 2016 - 18:18

Thanks again.  One last question (I think):  The redistributable package, vc_redist.x86.exe, has it's own pop-up window.  Is there a way to suppress that? 



deramor

deramor
  • Full Members
  • 187 posts

Posted 25 October 2016 - 18:20

They normally allow this.  Ask the exe for help by passing a /? argument.

 

Also this page has some examples though I haven't tried them myself for 2015.

http://asawicki.info...mmand_line.html



garyflet

garyflet
  • Full Members
  • 36 posts

Posted 27 October 2016 - 22:11

This is my first time at doing a prerequisite, and clearly I don't understand how to do it! I thought I could enter the location of the redist file (vc_redist.x86.exe) in the "Path to Local File" in the Prerequisite editor, and when InstallShield builds the install file (setup.exe), it would include the redist file to run it during an install. In the Redistributibles page I set the properties of the prerequisite file so that the Build Location would be "extract from setup.exe". Clearly something is wrong, because when running the setup, the prerequisite box shows up, but after clicking "Install", a message box appears saying, "The files for installation requirement 'my prerequisite file' could not be found." How does the install find the redist file on the machine being installed to?

deramor

deramor
  • Full Members
  • 187 posts

Posted 28 October 2016 - 19:20

I've never had a prerequisite for a release that was built as a single exe.  What does your output folder look like when you build the project?  Does it contain a folder that has a GUID for a name?  If you needed it all in one exe and can not do that through a prerequisite, you could stream the exe as a support file and launch it with a custom action.

 

Note there are limitations to this method.  Notably you can only run one installation at any time.  The easiest place to schedule this action would be at the end of the UI sequence.  You might be able to fit it into the execute sequence but it would need to be before the Windows Installer mutex is taken.  You can only install one thing at a time. 



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 29 October 2016 - 09:39

garyflet: please double check - you specified the correct location for the vc_redist.x86.exe in the "Path to Local File" list? Is it on the local hard disk (not a network drive, just to be sure it's not a network/permissions problem)? Did you also select vc_redist.x86.exe on the "Application to Run" tab? Do you get any build errors or warnings? Did you check the "admin privileges" box on the Behaviour tab?



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 29 October 2016 - 09:41

You can also open (the copy of) an existing .prq and use it as template.



garyflet

garyflet
  • Full Members
  • 36 posts

Posted 31 October 2016 - 17:59

Thanks again for your replies. I did check all the items on Stefan's list. Also of interest is that the install actually works, but only on the machine that I create it on. It seems that the installer uses the "Path to Local File" to find the redistributable file and everything is fine. The trouble occurs if I take the setup.exe to a different machine, then it can't find the file, of course, because it's not there. I assumed the install file would provide the file. Anyway, as Stefan suggested, I looked at other .prq files. What I notice is that they always also have a URL location. So apparently, if the installer can't find the executable in the"Path to Local File", it downloads the file from the web. But some of the machines I want to the customer to be able to install on may not be connected to the internet.

It appears, then, that the prerequisite method won't work on my case. I can build a "custom action", because I know that the install will be able to use the executable included with itself. I would prefer to use the prerequisite, but it apparently won't work in my case. Let me know if I'm missing something.

Thanks,
Gary

garyflet

garyflet
  • Full Members
  • 36 posts

Posted 31 October 2016 - 21:41   Best Answer

Since prerequisites don't work for me (as far as I can tell), I went back to looking at Merge modules and found a way. On the redistributables page, the 14.0 CRT and MFC merge modules are listed, but clicking the corresponding check boxes doesn't get them into the install, at least for InstallShield 2011. I had to right click on the page and noticed the option, "Browse for merge module...". Since I know that the modules exist in C:\program files (x86)\Common Files\Merge Modules I was able to select them. Then the appropriate checkboxes on the page were automatically checked and the install automatically installed the 2015 redistributables, allowing our software to run. Actually, I like this better than using the redistributable package as a prerequisite: There is no extra dialog asking to install the prerequisites and no redistributable install package to run. It's all done silently and automatically. This is the answer to the original post. What a relief!

Thanks,
Gary