Announcement

Collapse
No announcement yet.

VC++ 2010SP1 and 2013 Versioning detected

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • VC++ 2010SP1 and 2013 Versioning detected

    Looking at the dependency module for Visual C/C++ scripts, the scripts only look at the existence of an MSI install, they do not look at the version and update an older rev.

    I could look at the minor version and update, if it is older.

    Would there be issues with that?

  • #2
    Looks like the version string is the only place, where I can get the rev. Major and Minor do not change for each package.

    Comment


    • #3
      When I go from 12.0.21005 to 12.0.3105 the version string does not update, but the entry in Programs and Features does. It looks like I am not looking at the right thing?

      I am using MSI.GetProductInfo("{...}","VersionString")

      Comment


      • #4
        Both releases actually share the same ProductCode and DisplayVersion, but a new identifier was introduced which isn't recognized as "UpgradeCode". You didn't do anything wrong, the problem is that MS for some reason changed how the new version is installed. I now added a further test to figure out which release is installed, in case you must have the latest version... If 12.0.21005 was found and it would cause problem with your application, you would return false there.

        This is how you could check which release of the VC runtime is installed, if any:

        Code:
        [COLOR="#0000FF"]function[/COLOR] isVC2013x86_Installed()
          SetupData[COLOR="#FF0000"].[/COLOR]WriteToLogFile([COLOR="#800080"]"Info[COLOR="#800080"]\t[/COLOR]Visual C++ 2013 (32-bit) Module: Detection script started.[COLOR="#800080"]\r[/COLOR][COLOR="#800080"]\n[/COLOR]"[/COLOR][COLOR="#FF0000"],[/COLOR][COLOR="#0000FF"]true[/COLOR])[COLOR="#FF0000"];[/COLOR]
        
          [COLOR="#0000FF"]local[/COLOR] sProductCode [COLOR="#FF0000"]=[/COLOR] [COLOR="#800080"]"{13A4EE12-23EA-3371-91EE-EFB36DDFFF3E}"[/COLOR][COLOR="#FF0000"];[/COLOR]
          [COLOR="#0000FF"]if[/COLOR] (MSI[COLOR="#FF0000"].[/COLOR]QueryProductState(sProductCode) [COLOR="#FF0000"]==[/COLOR] INSTALLSTATE_DEFAULT) [COLOR="#0000FF"]then[/COLOR]
            [COLOR="#008000"]-- look for Microsoft Visual C++ 2013 Redistributable (x86) - 12.0.30501[/COLOR]
            [COLOR="#0000FF"]local[/COLOR] sBundleCode [COLOR="#FF0000"]=[/COLOR] [COLOR="#800080"]"{f65db027-aff3-4070-886a-0d87064aabb1}"[/COLOR][COLOR="#FF0000"];[/COLOR]
            [COLOR="#0000FF"]if[/COLOR] Registry[COLOR="#FF0000"].[/COLOR]DoesKeyExist(HKEY_LOCAL_MACHINE[COLOR="#FF0000"],[/COLOR] [COLOR="#800080"]"SOFTWARE[COLOR="#800080"]\\[/COLOR]Microsoft[COLOR="#800080"]\\[/COLOR]Windows[COLOR="#800080"]\\[/COLOR]CurrentVersion[COLOR="#800080"]\\[/COLOR]Uninstall[COLOR="#800080"]\\[/COLOR]"[/COLOR] [COLOR="#FF0000"]..[/COLOR] sBundleCode) [COLOR="#0000FF"]then[/COLOR]
              [COLOR="#0000FF"]local[/COLOR] sDisplayVersion [COLOR="#FF0000"]=[/COLOR] Registry[COLOR="#FF0000"].[/COLOR]GetValue(HKEY_LOCAL_MACHINE[COLOR="#FF0000"],[/COLOR] [COLOR="#800080"]"SOFTWARE[COLOR="#800080"]\\[/COLOR]Microsoft[COLOR="#800080"]\\[/COLOR]Windows[COLOR="#800080"]\\[/COLOR]CurrentVersion[COLOR="#800080"]\\[/COLOR]Uninstall[COLOR="#800080"]\\[/COLOR]"[/COLOR] [COLOR="#FF0000"]..[/COLOR] sBundleCode[COLOR="#FF0000"],[/COLOR] [COLOR="#800080"]"DisplayVersion"[/COLOR][COLOR="#FF0000"],[/COLOR] [COLOR="#0000FF"]true[/COLOR])[COLOR="#FF0000"];[/COLOR]
              SetupData[COLOR="#FF0000"].[/COLOR]WriteToLogFile([COLOR="#800080"]"Info[COLOR="#800080"]\t[/COLOR]Visual C++ 2013 Module: Microsoft Visual C++ 2013 x86 Runtime "[/COLOR] [COLOR="#FF0000"]..[/COLOR] sDisplayVersion [COLOR="#FF0000"]..[/COLOR] [COLOR="#800080"]" detected.[COLOR="#800080"]\r[/COLOR][COLOR="#800080"]\n[/COLOR]"[/COLOR][COLOR="#FF0000"],[/COLOR][COLOR="#0000FF"]true[/COLOR])[COLOR="#FF0000"];[/COLOR]
            [COLOR="#0000FF"]else[/COLOR]
              [COLOR="#008000"]-- look for Microsoft Visual C++ 2013 Redistributable (x86) - 12.0.21005[/COLOR]
              [COLOR="#0000FF"]local[/COLOR] sDisplayVersion [COLOR="#FF0000"]=[/COLOR] Registry[COLOR="#FF0000"].[/COLOR]GetValue(HKEY_LOCAL_MACHINE[COLOR="#FF0000"],[/COLOR] [COLOR="#800080"]"SOFTWARE[COLOR="#800080"]\\[/COLOR]Microsoft[COLOR="#800080"]\\[/COLOR]Windows[COLOR="#800080"]\\[/COLOR]CurrentVersion[COLOR="#800080"]\\[/COLOR]Uninstall[COLOR="#800080"]\\[/COLOR]"[/COLOR] [COLOR="#FF0000"]..[/COLOR] sProductCode[COLOR="#FF0000"],[/COLOR] [COLOR="#800080"]"DisplayVersion"[/COLOR][COLOR="#FF0000"],[/COLOR] [COLOR="#0000FF"]true[/COLOR])[COLOR="#FF0000"];[/COLOR]
              SetupData[COLOR="#FF0000"].[/COLOR]WriteToLogFile([COLOR="#800080"]"Info[COLOR="#800080"]\t[/COLOR]Visual C++ 2013 Module: Microsoft Visual C++ 2013 x86 Runtime "[/COLOR] [COLOR="#FF0000"]..[/COLOR] sDisplayVersion [COLOR="#FF0000"]..[/COLOR] [COLOR="#800080"]" detected.[COLOR="#800080"]\r[/COLOR][COLOR="#800080"]\n[/COLOR]"[/COLOR][COLOR="#FF0000"],[/COLOR][COLOR="#0000FF"]true[/COLOR])[COLOR="#FF0000"];[/COLOR]
            [COLOR="#0000FF"]end[/COLOR]
            [COLOR="#0000FF"]return[/COLOR] [COLOR="#0000FF"]true[/COLOR][COLOR="#FF0000"];[/COLOR]
          [COLOR="#0000FF"]else[/COLOR]
            SetupData[COLOR="#FF0000"].[/COLOR]WriteToLogFile([COLOR="#800080"]"Info[COLOR="#800080"]\t[/COLOR]Visual C++ 2013 (32-bit) Module: Microsoft Visual C++ 2013 Redistributable (x86) not found.[COLOR="#800080"]\r[/COLOR][COLOR="#800080"]\n[/COLOR]"[/COLOR][COLOR="#FF0000"],[/COLOR][COLOR="#0000FF"]true[/COLOR])[COLOR="#FF0000"];[/COLOR]
            [COLOR="#0000FF"]return[/COLOR] [COLOR="#0000FF"]false[/COLOR][COLOR="#FF0000"];[/COLOR]
          [COLOR="#0000FF"]end[/COLOR]
        [COLOR="#0000FF"]end[/COLOR]
        Ulrich
        Last edited by Ulrich; 05-09-2015, 01:50 PM.

        Comment

        Working...
        X