Option Explicit 'On Error Resume Next Const HKEY_LOCAL_MACHINE = &H80000002 Const SubKeyName = "Microsoft\Windows\CurrentVersion\Uninstall\" Const VCVersion = 2015 Dim WshShell, arch, reg, firstkey, keys, key, ret, display_name Set WshShell = WScript.CreateObject("WScript.Shell") arch = WshShell.Environment("Process").Item("PROCESSOR_ARCHITECTURE") If arch = "x86" Then firstkey = "SOFTWARE\" Else firstkey = "SOFTWARE\Wow6432Node\" arch = "x64" End If Set reg = CreateObject("WbemScripting.SWbemLocator").ConnectServer(, "root\default").Get("StdRegProv") reg.EnumKey HKEY_LOCAL_MACHINE, firstkey & SubKeyName, keys For Each key In keys display_name = "" ret = reg.GetStringValue(HKEY_LOCAL_MACHINE, firstkey & SubKeyName & key, "DisplayName", display_name) If Instr(display_name, "Redistributable (" & arch & ")") > 0 Then If CInt(Mid(display_name, 22, 4)) >= VCVersion Then Wscript.Quit(1) End If End If Next Wscript.Quit(0)