michael@bitplane.com
Posts: 7
Joined: Tue Feb 23, 2016 4:45 pm

VC-Redist2012 installed every time running our installer

Hi,

Our installer installs Visual Studio 2012 redist package as a prerequisite. I added the redist using advanced installer.

Now, when I run our installer, it correctly installs redist2012. However, the second time running our installer, redist2012 is again installed.

I found that the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\vc\Servicing\11.0\RuntimeMinimum is set to 11.0.50727 (coming from earlier installation of redist2012) instead of 11.0.61030 and there is an additional key UpdateVersion set to 11.0.61030.

Uninstalling redist2012 and running our installer is solving the problem.

Is this an advanced installer or a redist2012 problem? Any idea on how to solve this?

Many thanks
Michael Gähwiler
Catalin
Posts: 6584
Joined: Wed Jun 13, 2018 7:49 am

Re: VC-Redist2012 installed every time running our installer

Hello Michael,

A prerequisite's condition is evaluated twice:

- first time, the condition must be false --> the prerequisite will be installed

- second time, after the prerequisite was installed, the condition must be true --> the prerequisite was correctly installed

If I understand correctly, you have the VC++ Redistributable 2012 Update 4 in your setup and, on the machine where you are installing the setup, an older version of VC++ Redistributable 2012 is installed.

Upon the installation of prerequisite, the registry entry should be updated, for instance the "Version" entry should be rewritten from:

11.0.50727 --> 11.0.61030

However, in your case, it seems that it is not rewritten, which is pretty strange. This is the reason why, upon the second installation of your setup, it will search that registry key and will see that the minimum version is not 11.0.61030 and it will consider that the prerequisite was not installed and will try to install it once again.

One thing that I can think of as for this moment is the fact that you may not have administrative privileges. Did you provide elevated privileges for the VC++ Redistributable setup? Also, have you tried running the main setup as administrator and see if the problem still persists?

I have tried to test this behavior, but I was unable to reproduce it since the registry value was correctly overwritten. If the above does not help, could you please forward me the following:

- the .AIP file used to build your project

- a download link for the setup built using the above specified .AIP file

- a download link for the 11.0.50727 version of VC++ Redistributable 2012 (I am asking for this because I was not able to find any download link for this version. I was only able to find a download link for the 11.0.60xxx version with which I have tested my scenario. However, even if I doubt it, this issue may be version related and I want to test this scenario as well).


by e-mail at support at advancedinstaller dot com so I can further investigate this scenario?

Looking forward to hearing from you.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
michael@bitplane.com
Posts: 7
Joined: Tue Feb 23, 2016 4:45 pm

Re: VC-Redist2012 installed every time running our installer

Hi Catalin,

- I did run our installer from a cmd with admin rights.
- We don't have version 11.0.50727 version of VC++ Redistributable 2012. I assume the version key comes from an installation done years ago...

- Looking at the list of installed programs, redist 2012 11.0.61030 is installed, yet registry shows a different version
- We uninstalled redist2012 and installed again using our installer => registry key is updated to 10.0.61030

I will send you the remain stuff by tomorrow.

Many thanks
Michael
Catalin
Posts: 6584
Joined: Wed Jun 13, 2018 7:49 am

Re: VC-Redist2012 installed every time running our installer

Hello Michael,

First of all, please accept my apologies for the delayed reply.

Thanks for the provided files.

Unfortunately, I was not able to replicate this behavior.

First of all, it was impossible for me to find a download link for VC++ Redistributable 2012 update 3 11.0.5xxxx. It seems that Microsoft completely erased any link to that.

What I have tried was to create the registry entry manually on a clean VM. After doing so, I ran the sent setup, VC++ Redistributable 2012 installed as expected. After doing so, I checked the registry entry and I noticed that it was overwritten with the 11.0.6xxxx version. Then I have tried to run the setup once again and I noticed that the prerequisites are skipped.

At first, I was thinking that maybe the user did not have enough rights to write to the registries. However, by default, the HKLM hive can be written by administrators.

Have you tried testing this scenario on a clean machine (e.g. fresh Windows install on a Virtual Machine)? Does this reproduce there as well?

Unfortunately, I am afraid that I ran out of ideas and, as long as I can not lay my hands on a VC++ Red 2012 (the update 3) setup, I can not continue my testing (the most I could do was to create the registry keys manually and everything worked as expected in that case. Also, to be fully honest with you, I doubt the outcome would be different if the registry entries were to be written by the setup itself).

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
michael@bitplane.com
Posts: 7
Joined: Tue Feb 23, 2016 4:45 pm

Re: VC-Redist2012 installed every time running our installer

Hi Catalin,

Thanks a lot for looking into this.

We cannot reproduce this either as we don't have the older Redist 2012 package. Also, uninstalling redist2012 and reinstalling it via our installer did solve the problem. So we leave it at that.

Thanks again for your help
Michael
Catalin
Posts: 6584
Joined: Wed Jun 13, 2018 7:49 am

Re: VC-Redist2012 installed every time running our installer

Hello Michael,

You are always welcome.

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

Return to “Common Problems”