asfarley
Posts: 6
Joined: Wed Mar 07, 2018 7:23 am

VC++ Redistributable prerequisite is not installed, despite conditions being met

Wed Mar 07, 2018 7:51 am

I've created an installer project for my .NET application. The installer is working, except that the Visual C++ Redistributable for Visual Studio 2017 is apparently not being installed when I want it to be.

I have set up the following Feature-based prerequisite:

Install conditions:
"Install prerequisite based on conditions"
Registry value contains version
HKLM\SOFTWARE\Microsoft\DevDiv\VC\Servicing\14.0\RuntimeMinimum\Version
14.10.25008

"Install prerequistie if all conditions are false"
"Use 64-bit locations when evaluation conditions on a 64-bit machine" is checked

Manual inspection on the target PC confirms that the key/value pair in the Search string does not exist. So, I think "all conditions are false" and the prerequisite should be triggered.

If I navigate to the folder where Advanced Installer has downloaded vc_redist.x64.exe and copy this file to the target, and install the prereq manually, then my application works fine. If I don't install the vc_redist.x64.exe manually, I get missing DLL exceptions at launch.

My installer project Package Definition Build setting: Package Type is configured as Single EXE setup (resources inside).

The target PC is an AWS Windows Server 2016 Base instance.

Any idea why the redist isn't being installed?

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

Re: VC++ Redistributable prerequisite is not installed, despite conditions being met

Thu Mar 08, 2018 2:46 pm

Hello and welcome to our forums,

I'm not sure why this happens. I've tested the scenario on a Windows Server 2016 machine x64 machine, but I cannot replicate the behavior.

Can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them?

If you cannot share with us your project file, then you can try to isolate the behavior in a buildable sample (.aip + its referenced files) which we can build and test on our side.

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

asfarley
Posts: 6
Joined: Wed Mar 07, 2018 7:23 am

Re: VC++ Redistributable prerequisite is not installed, despite conditions being met

Thu Mar 08, 2018 5:44 pm

Hi Daniel

Thanks for following up. The issue turned out to be that I had configured the prerequisites as Feature-based, when they should have been configured as Pre-Install.

There's a very brief mention of this caveat on this thread:
viewtopic.php?t=31026

Essentially: ".NET prerequisites must be configured as Pre-Install". After configuring as Pre-Install, the installer performed as expected: running the VC++ redistributable installer on machines where it wasn't already present.

I'm happy to upload my installer project for you to inspect. I will upload it to your forum later today. I really appreciate the quick support response as well; I'm currently using the trial version but I will be purchasing an Advanced Installer license for production usage this week.

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

Re: VC++ Redistributable prerequisite is not installed, despite conditions being met

Fri Mar 09, 2018 12:54 pm

Hello,

Thank you for your follow up on this.

I'm not aware of any issue generated when the VC++ Redistributable prerequisite are configured as feature-based. Their installation should work without any problem.

If you want to further investigate this on our side please send us your AIP and a verbose log of the installation and we will gladly analyze your installation scenario.

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

asfarley
Posts: 6
Joined: Wed Mar 07, 2018 7:23 am

Re: VC++ Redistributable prerequisite is not installed, despite conditions being met

Mon Mar 12, 2018 6:22 am

My .aip file and a verbose installer log are attached.
Attachments
VTC.aip
(55.14KiB)Downloaded 432 times
install.log
(395.87KiB)Downloaded 329 times

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

Re: VC++ Redistributable prerequisite is not installed, despite conditions being met

Wed Mar 14, 2018 9:58 am

Hello,

Thank you for your sent files.

After inspecting your project settings I can tell you that the feature-based "Visual C++ Redistributable for Visual Studio 2017 x64" prerequisite is not installed because:

1. your setup package is configured NOT to run with full UI (it actually runs with basic UI)
2. your setup project is of "Professional" type

Please note that for feature-based and post-install prerequisites, on below Enterprise project types only the "Full UI" install command line can be used and the prerequisite will be installed only if the main package is run with full UI. All other command line fields will be ignored and the prerequisite will not be installed if the main package is installed with silent or basic UI.

To avoid this limitation you will have to either upgrade your project type to "Enterprise" or higher edition or to add your prerequisite as a Pre-install one.

If you have any questions or doubts just let us know.

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

asfarley
Posts: 6
Joined: Wed Mar 07, 2018 7:23 am

Re: VC++ Redistributable prerequisite is not installed, despite conditions being met

Wed Mar 14, 2018 5:04 pm

Got it. Thank you for the explanation!

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

Re: VC++ Redistributable prerequisite is not installed, despite conditions being met

Thu Mar 15, 2018 8:34 am

You are always welcome.

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

ramana_541
Posts: 1
Joined: Tue Apr 30, 2019 8:59 pm

Re: VC++ Redistributable prerequisite is not installed, despite conditions being met

Fri Mar 18, 2022 2:11 pm

Hello Daniel,

We used to use always install Prerequisites but we would like to change that to install only if its already not installed.

so I made change( attached the file ), but Its not installing prerequisites in spite of meeting the criteria.

Please help.
Attachments
Check_In_Check_Out_Service_new.aip
(65.1KiB)Downloaded 172 times

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: VC++ Redistributable prerequisite is not installed, despite conditions being met

Mon Mar 21, 2022 1:37 pm

Hello Ramana and welcome to our forums,
so I made change( attached the file ), but Its not installing prerequisites in spite of meeting the criteria.
Please note that your setup will evaluate the condition you specify twice, as it follows:

- it will evaluate the condition once before installing the prerequisite. At this point, the condition must be FALSE - meaning that the prerequisite is NOT installed.

- it will then evaluate the condition after the prerequisite was installed. At this point, the condition must be TRUE - meaning that the prerequisite was correctly installed.

For a better and easier approach, you could use the prerequisites from our predefined list, as they have the correct conditions already set.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”