Installing Visual C++ redist as a pre-req in an MSI package - Advanced Installer Community
Jabs
Posts: 2
Joined: Mon Nov 17, 2014 1:56 pm

Installing Visual C++ redist as a pre-req in an MSI package

Hi all,

I'm not very experienced building MSI's, so bear with me.

I set out building a project, my goal was to produce a single MSI which first installed Visual C++ Redistributable for VS2013 x86, then installed an custom .exe, then started a service associated with that .exe.

The .exe cannot be installed if Visual C++ Redist is not present, so installing Visual C++ as a feature package is not an option (as it installs Visual C++ after the main install).

I have since discovered that I cannot have an MSI package type AND include Visual C++ as a prerequisite, as Visual C++ requires an EXE bootstrapper. Unfortunately An EXE is no good to me as previously mentioned (this is for mass deployment), so I'm a little stuck.

Looking at other, similar posts on these forums, I gather this is due to a limitation with the Windows Installer service. I had resigned myself to the idea that what I wanted isn't achievable, but I've just seen articles for other tools (Wix) in which they suggest this is doable.

I'd rather use Advanced Installer than other tools, so could anyone please explain in a bit more detail why it isn't doable, or what the limitation is with Windows Installer? Or is this a limitation of Advanced Installer? If there is a workaround or a way of doing this that I have missed, please let me know, I'd love to get it working.

Would really appreciate any help, thanks
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Installing Visual C++ redist as a pre-req in an MSI pack

Hello and welcome to Advanced Installer forums,

Please note that the feature based prerequisites are launched right before the main installation. Can you please make sure that your prerequisites are added as feature-based?
However, if the main installation package is launched silently, then the feature based prerequisite will be launched after the main installation. Is this you case too?

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Jabs
Posts: 2
Joined: Mon Nov 17, 2014 1:56 pm

Re: Installing Visual C++ redist as a pre-req in an MSI pack

Hi Dan,

Thanks for the reply, appreciate you taking the time

That is an interesting point and it is good to know. Unfortunately I do need to install it silently. Is there a way around this? If not, it would be great to understand a little more about why it is this way

Many thanks
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Installing Visual C++ redist as a pre-req in an MSI pack

Hi,
Unfortunately I do need to install it silently.
I'm not sure I fully understand your scenario.
Would you like to install silent the main installation package or would you like to install silent only the Visual C++ and the main installation package will be launched with Full UI?

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
philbo
Posts: 11
Joined: Mon May 04, 2015 12:33 pm

Re: Installing Visual C++ redist as a pre-req in an MSI package

Hi,

is there a solution for this problem?

I want to install Visual C++ Redistributable 2013 before my main installation / currently it is under Faeture based as a prerequisite. This prerepuisite has for all types of installations (Full / Basic UI / Silent), the following command line parameter (/w /q /norestart - in the end silent install). My main installation (needs to be an msi, no other possibility), however requires Visual C++ and is both executed with Full UI or Silently (Unattended).

So is my problem solveable with AI 12.8?

Thank you and BR,

Philipp
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Installing Visual C++ redist as a pre-req in an MSI package

Hello Philipp,

To solve your problem, we recommend you to use an MSI wrapper that first call the installation of your prerequisite (Visual C++ Redistributable 2013) and then your main installation.
For instance, you can make the following configuration:
1. Create a new MSI project.
2. Add the two installation files (the EXE of Visual C++ and your main MSI) in the "Prerequisites" page as "Post-install" prerequisites.
3. For each prerequisite you go to "Setup files" tab and specify, in "Install Command Lines", the behavior of these installations when the main installation runs silently.
4. In “Product Details“ page you uncheck the option “Register product with Windows Installer“ if you don't want the wrapper to appear in the list of programs in Control Panel.
5. Build the MSI.

For a practical example you can take a look at Creating Suite Installations tutorial.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”