2

I am trying to detect if C++ Redistributable 2012 update 3 is installed on machine.... I am currently doing check for 2008 through registry search and using guid, but I do not know guid for 2012 update 3... Does anybody know how to detect it?

I also found this link but it`s not exactly for update 3 and I do not know right numbers which I should to check...

Thanks

Community
  • 1
  • 1
Dusan Plavak
  • 4,457
  • 4
  • 24
  • 35

1 Answers1

0

You can figure this out yourself for any installer: use a pc that doesn't yet have the product installed, start procomon, add a filter so that includes only info from the installer process (something like command line contains vcRedist should be sufficient) and start the installer. After it finishes, examine which registry keys it wrote.

For VS2102 the interesting stuff will be here:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\vc\Servicing\11.0

(which is by the way also answered in the question you link to)

edit in addition to the above, you could also check

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\5C4834679ACBC703A9CADF44632686A6

or

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{764384C5-BCA9-307C-9AAC-FD443662686A}

(note both are for the x64 redistributable), that's how eg Installshield's prerequisites perform the check.

stijn
  • 34,664
  • 13
  • 111
  • 163
  • Are you sure that this is the correct answer? I need to check if it is UPDATE 3 version... what if is installed just basic 2012 redist? – Dusan Plavak Aug 23 '13 at 09:10
  • Read carefully: the first paragraph can't possibly be wrong. Did you try it? As for the second paragraph: did you compare the contents of that registry key before and after installing update 3? You should see it will have different version numbers. – stijn Aug 23 '13 at 09:14
  • well I checked the numbers... they did not change... I am checking the registry way with guid right now... – Dusan Plavak Aug 23 '13 at 09:36
  • you're doing something wrong then.. pre-update 3 has version number 11.0.50727, update 3 is 11.0.60610 – stijn Aug 23 '13 at 09:43
  • Ok it was caused because I had installed also VS 2012... I accept solution with HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\vc\Servicing\11.0 after some test it looks like it is what I was looking for... Just do not forget that in Version you found the newest one... so if somebody want to check then condition should be 11.0.60610 or greater... – Dusan Plavak Aug 23 '13 at 10:38
  • On my computer, there are three subkeys under 11.0: `RuntimeAdditional`, `RuntimeDebug`, and `RuntimeMinimum`. The version numbers were found under these subkeys, but not found on the `11.0` key. – rwong Oct 04 '13 at 17:00