As an alternative, you can enumerate the registry looking at the “Displayname” key for the following tokens: ‘Microsoft’, ‘Visual’, ‘C++’, ‘Redistributable’. You can use the following to determine if the sub-key is what you’re after…
// search for valid tokens to indicate this is a redistributable.
resToken = name.Tokenize (_T(" "), curPos);
while (resToken != _T(""))
{
if (resToken == _T("Microsoft"))
tokenCount |= 0x01;
if (resToken == _T("Visual"))
tokenCount |= 0x02;
if (resToken == _T("C++"))
tokenCount |= 0x04;
if (resToken == _T("Redistributable"))
tokenCount |= 0x08;
resToken = name.Tokenize (_T(" "), curPos);
}
// check for matching tokens in the Display Name.
if (tokenCount == 0x0f)
{
Simply start your search at “SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” and enumerate all of the sub-keys for the above values. You would also need to check both the 32 and 64 bit hives.