18 Replies Latest reply on Sep 25, 2014 8:06 PM by Diabhal

    Vcredist 2012 11.0.61030 Registry Applicability check?

    Diabhal

      Vcredist 2012 11.0.61030 Registry Applicability check

       

       

      I’ve read posts / watched all the videos linked on how to / talked to person on phone that said they couldn’t really help me with the specifics as it’s available but not supported! So I figure I’d come here to see if anyone got this working or can help.

       

      None seemed to be specific on registry checks without file version check.

       

      I’ve tried the following setups with “Not Rule” both checked and uncheck as the only rule in applicability rules.

       

      In all cases it appears to ignore it and try to install on both the machine that does have the registry entry already and the one that does not.

       

      I found this one specifically that broke down the troubleshooting to supposedly only need to use the Applicability Ruleset if I’m reading it right.

       

      https://thwack.solarwinds.com/community/application-and-server_tht/patchzone/blog/2012/10/19/how-to-troubleshoot-update-misbehavior-caused-by-defective-rules

       

      FAILING TO REPORT AS NOT INSTALLED

      This is an update that reports as Not Applicable when it should be detected as needed. The techniques for diagnosing the problem are identical to the techniques just described in the previous paragraphs, except now you have two rulesets to troubleshoot -- the Prerequisite Ruleset and the Applicability Ruleset. However, we can take advantage of the fact that the PreRequisite Ruleset is actually optional (the Applicability Ruleset is not). So after visually verifying each and every rule (and presuming you've not already identified the errant rule), create test packages as before, except populate each rule in to the Applicability Ruleset only. At least one package will detect as Not Applicable, and that will identify the errant rule. Fix the appropriate ruleset in the original package and republish the package.”

       

       

      Registry Key in question that I want to check for, specifically that the version number matches.

       

      [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\11.0\VC\Runtimes\x64]

      "Version"="v11.0.61030.00"

      "Installed"=dword:00000001

      "Major"=dword:0000000b

      "Minor"=dword:00000000

      "Bld"=dword:0000ee66

      "Rbld"=dword:00000000

       

      Can anyone give me the proper Applicability Rule and Installed Rule to check if it's there to not install it and if it isn't to go ahead and install?

       

      Thanks - Charles

       

      EDIT: Even just tried a "Registry Key Exists" as HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\11.0\VC\Runtimes\x64 in the "Applicability Rules" and it still updates on both as needing to install when one has it and the other does not.

        • Re: Vcredist 2012 11.0.61030 Registry Applicability check?
          Lawrence Garvin
          None seemed to be specific on registry checks without file version check.

           

          Registry checks by themselves, without file checks, are notoriously unreliable EXCEPT when used to determine if a product is NOT installed.

          The absence of a registry KEY is always a great indicator that a product is not installed.

          As such, the best place to use such rules is typically in the Prerequisite Ruleset.


          Ergo, you can test for the absence of the "Visual Studio" key to determine that the update is not applicable,

          but to determine that an update IS applicable, you should really test for one or more of the actual *FILES* (by File Version) that are going to be replaced by the update.

          [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\11.0\VC\Runtimes\x64]

          "Version"="v11.0.61030.00"

          "Installed"=dword:00000001

          "Major"=dword:0000000b

          "Minor"=dword:00000000

          "Bld"=dword:0000ee66

          "Rbld"=dword:00000000

           

          Can anyone give me the proper Applicability Rule and Installed Rule to check if it's there to not install it and if it isn't to go ahead and install?

           

          First, since you're apparently checking a VALUE in the registry, it now matters which of the four "Registry Value" rules you're actually using:

          • Registry DWORD Value
          • Registry Expand String Value
          • Registry String Value
          • Registry Version in String

           

          Since you're looking for a four-part dotted decimal value, it should be stored in a STRING value, and you should be using the "Registry Version in String" rule type.

           

          Second thing I'll note is that the VALUE for your "Version" field is incorrectly formatted. It should be a simple four-part dotted decimal number. Lose the preceding 'v'.

          e.g. "Version"="11.0.61030.0"

           

          If the VENDOR stores that value with a preceding 'v', then you'll have to use the Registry String Value rule type, and you can ONLY test for equality.

           

          Third, and potentially problematic depending on the above, an Applicability Rule should always be defined as a LESS THAN comparison, so for Applicability you're not looking for something that matches, you're looking for something that's older than what it should be, and you want it to evaluate as TRUE (TRUE that the version currently on the system is OLDER than the version that will be put on the system if the update is applicable). For the Installed Rule, you should be looking for something that matches (i.e. EQUAL TO) -- the *correct* version is already here.

           

          Finally, since it seems that you're testing for a 32-bit app on a 64-bit system, rather than explicitly checking the 'Wow6432Node', try checking the natural node, and checking the "Use 32 bit registry" checkbox. One of the advantages of doing this is that you can then use the same package for BOTH 32-bit systems AND 64-bit systems. The rule as implied above can only be used on 64-bit systems. (Although I'm curious that you'd be checking for something in the x64 subnode of ~\Runtimes in the Wow6432Node.)

          9-18-2014 8-34-41 PM.png

           

           


            • Re: Vcredist 2012 11.0.61030 Registry Applicability check?
              Diabhal

              Lawrence,

               

              Thanks very much for the detailed post.   It does give more insight into what should work for testing.

               

              It is in fact a 64 bit application from Microsoft.  This is a link to the site for download and the file is called vcredist_x64.exe

               

              http://www.microsoft.com/en-US/download/details.aspx?id=30679

               

              Part of the problem is they always call it the same file name when they do updates.   And the updates are not really updates as much as here’s another one to install as well because we left some stuff out from the last one that you may have needed too.

               

              So we end up installing every version.

               

              I found that registry as being the one to monitor that gets added and removed during install and uninstall.   I know this doesn't help if someone manually deletes the files it creates but I’ll deal with that if it happens.

               

              I was going to do file to the file exists with registry value except the files they create have different versions than the version of the install.

               

              So as you were saying, I figured I could at least see if the registry key exists with that version number and if not It would install.

               

              Something you brought up as an issue maybe is the “v” in the version number.   Microsoft mistake I guess?   So yes, I've been using Registry String Value, but maybe I've not been setting it up correctly?

               

              So here’s what I tried based on what you had said about using the Prerequisite.  If I understand correctly it should be strictly a False / Don’t Install, True / Install option.

               

              No Applicability Rules and No Installed Rules.

              xml.png

              rule.png

               

               

              I've tried this with “Not Rule” both unchecked as I’d assume and checked just in case.

               

              In both cases it tries to install on both the machine that does have and doesn't have this registry entry.

               

              So this is where I’m confused as my assumption is that if it fails to find the registry it shouldn't want to install.

               

              I thought maybe for some reason it couldn't scan the registry at all, but if that was the case, then shouldn't it fail and not want to install as well?

               

              I can’t seem to find log files that may say exactly what it is doing during the evaluation process?

               

              As you can tell there are a lot of assumptions being made on my part, and I’m sorry for my stupidity in this matter.  You’re help is greatly appreciated!

               

              -Charles

                • Re: Vcredist 2012 11.0.61030 Registry Applicability check?
                  Lawrence Garvin
                  This is a link to the site for download and the file is called vcredist_x64.exe


                  I'm only too familiar with the nightmare that is the VC++ runtimes. We used them for Patch Manager, in fact. :-)


                   

                  No Applicability Rules and No Installed Rules.

                   


                  You must have at least one rule in each ruleset. If you have no Applicability Rules, then the package will always return FALSE to isInstallable and forever be NotApplicable. If you have no Installed Rules, then the package will forever return FALSE to isInstalled and never be reported as installed, even if it is. There must be at least one rule in each set that's capable of returning a TRUE condition.


                  For your Applicability Rules, if the Microsoft supplied registry value is 'v11.0.61003.00' then you should use two rules:

                  When ALL of the following...

                  • Registry Value Exists - if this rule evaluates to FALSE, then the package is NotInstalled and nothing else matters.
                  • Registry String Value - set this to a NOT RULE with an EQUAL TO test for the defined string.

                  If the Registry Value Exists, but the String does not match, then the combination of both rules will return TRUE and the package is NotInstalled.

                  If the Registry Value Exists, and the string does match, then the combination of both rules will return FALSE and the package is NotApplicable.


                  For your Installed Rules:

                  When ALL of the following...

                  • Registry Value Exists - if this rule evaluates to FALSE, the package is not installed and nothing else matters
                  • Registry String Value - set this to an EQUAL TO test for the defined string.

                  If the Registry Value Exists, but the string does not match, then this combination of rules will return FALSE, and the result of the Applicability Rules will determine whether the package is NotInstalled or NotApplicable.

                  If the Registry Value Exists, and the string does match, then this combination of rules will return TRUE, and the package is Installed (and the Applicability Rules are irrelevant).


                  The PreRequisite Rule example I used only applies to *UPDATE* packages. As you note, the VC Runtime packages are not updates, they're all FULL installs of co-existing products.

                   


                    • Re: Vcredist 2012 11.0.61030 Registry Applicability check?
                      Diabhal

                      Never wanted to be one of THOSE guys but here I am .

                       

                      Here's the setup that when I publish it, and check for updates on the two machines, they both still think they need it when one does not.  Yell at me if I set something wrong.

                       

                      Prerequisite Rules

                      1.JPG

                       

                      Package

                      2.JPG

                       

                      Applicability Rules

                      3.JPG

                       

                      Installed Rules

                      4.JPG

                       

                      Registry of machine it's already installed on:

                      5.JPG

                       

                      Registry of machine it's not installed on:

                      6.JPG

                        • Re: Vcredist 2012 11.0.61030 Registry Applicability check?
                          Lawrence Garvin

                          Check the "Use 32-bit Registry" checkbox in all rules where you reference the WOW6432Node tree.

                          On a 64-bit system, it's going to try to find that node in the 64-bit hive, and it's not in the 64-bit hive, it's in the 32-bit hive.

                           

                          9-19-2014 7-22-18 PM.png

                            • Re: Vcredist 2012 11.0.61030 Registry Applicability check?
                              Diabhal

                              Done ... same results, both see as wanting to install it.

                               

                              Applicability Rules

                              1.JPG

                               

                              Installed Rules

                              2.JPG

                                • Re: Vcredist 2012 11.0.61030 Registry Applicability check?
                                  Lawrence Garvin
                                  Done ... same results, both see as wanting to install it.


                                  Well, shucks. The only logical conclusion I can draw from all of this is that it's not correctly evaluating the Registry Value rule. What I suspect is happening is that the rule, which should evaluate as TRUE, and then NOT TRUE == FALSE, thus making the entire ruleset FALSE (and thus NotApplicable), is actually evaluating as FALSE, and then NOT FALSE == TRUE, plus the RegistryValueExists rule evaluated as TRUE, results in the entire ruleset being TRUE (and thus NotInstalled). This is then reinforced by the same defect in the Installed Ruleset. Over there, the rule should also evaluate as TRUE, making the ruleset TRUE, but the rule is evaluating as FALSE, making the ruleset FALSE (i.e. not Installed).


                                  The question now becomes: Why is the rule not properly evaluating? What other options exist for establishing the existence of the runtimes, if not this Registry Value.


                                  The second question will be much easier to answer than the first, methinks. 


                                  <Looking> and... I think I have a suggestion for you: There are three DWORD values that can also be used to do a version comparison: "Major", "Minor", and "Bld".

                                  Start, for testing purposes, by using a single rule that tests for a Registry DWORD Value of 61030 in "Bld", and see if that provides better behavior.

                                  If not, then I might be wrong about my assumptions above.



                                    • Re: Vcredist 2012 11.0.61030 Registry Applicability check?
                                      Diabhal

                                      Think I understood what you where asking for but just to verify, I updated it as follows and same results

                                       

                                      Applicability Rules

                                      1.JPG

                                       

                                      Installed Rules

                                      2.JPG

                                        • Re: Vcredist 2012 11.0.61030 Registry Applicability check?
                                          Lawrence Garvin

                                          Yep. That's where I was headed.

                                          I'm baffled as to why this is not working correctly.

                                          Let me ponder on this a bit.

                                            • Re: Vcredist 2012 11.0.61030 Registry Applicability check?
                                              Diabhal

                                              No problem, and thanks again for all your help on this.   I did a search in the registry originally for 11.0.61030.00 and this is the first thing that showed up.   I uninstalled in and it was removed so figured it was the best thing to go after.

                                               

                                              On your thoughts for other entries I've searched for 11.0.61030 and more options show up that are also removed when uninstalled, so maybe there is another one to go after ... but why is this one not working is still a question.

                                               

                                              The other ones are mostly uninstall paths and dependencies, except the following:


                                              None of these were found when uninstalled.  So maybe one of them is a better choice?

                                              1.JPG

                                              2.JPG

                                              3.JPG

                                              4.JPG

                                              5.JPG

                                               

                                               

                                              Again, the help is greatly appreciated and take your time as the weekend is upon us

                                               

                                              -Charles

                                                • Re: Vcredist 2012 11.0.61030 Registry Applicability check?
                                                  Lawrence Garvin

                                                  Ahhh.. I saw a thread a while ago that mentioned HKLM\Software\Microsoft\DevDiv\VC\Servicing\11.0\RuntimeAdditional, but part of the issue was that the O.P. in that thread didn't have that key. I'd start with that one.

                                                  Not sure whether to use "UpdateVersion" or "Version" though; my inclination, though, is to use the simple one: "Version".

                                                  Also, because this REG_SZ value does have a dotted decimal value in it with no extra noise, use the Registry Version in String rule type.

                                                    • Re: Vcredist 2012 11.0.61030 Registry Applicability check?
                                                      Diabhal

                                                      Assuming I set them up right, same results.  Thanks again for your help today and I'll follow-up with more testing on Monday.

                                                       

                                                      Or maybe tonight remotely after I go walk the dog

                                                       

                                                      Applicability Rules

                                                      1.JPG

                                                       

                                                      Installed Rules

                                                      2.JPG

                                                        • Re: Vcredist 2012 11.0.61030 Registry Applicability check?
                                                          Diabhal

                                                          Still looking into this.  Here is a snip of wsus logs around the install for the machine that has it installed already.   Any idea where the logs are that give a play by play of the rules as they are checked on against the machines registry?

                                                           

                                                          2014-09-2514:34:31:162 2881864AUSuccessfully wrote event for AU health state:0
                                                          2014-09-2514:34:31:162 2881864AUFeatured notifications is disabled.
                                                          2014-09-2514:34:31:162 2881864AUAU setting next detection timeout to 2014-09-26 01:18:46
                                                          2014-09-2514:34:31:162 2881864AUSetting AU scheduled install time to 2014-09-26 10:00:00
                                                          2014-09-2514:34:31:162 2881864AUSuccessfully wrote event for AU health state:0
                                                          2014-09-2514:34:31:162 2881864AUAuto-approving update for download, updateId = {572F9FE7-EA24-4C8F-9BB1-D76DA5DC8E95}.1, ForUx=0, IsOwnerUx=0, HasDeadline=0, IsMinor=0
                                                          2014-09-2514:34:31:162 2881864AUAuto-approved 1 update(s) for download (NOT for Ux)
                                                          2014-09-2514:34:31:162 2881864AU#############
                                                          2014-09-2514:34:31:162 2881864AU## START ##  AU: Download updates
                                                          2014-09-2514:34:31:162 2881864AU#########
                                                          2014-09-2514:34:31:162 2881864AU  # Approved updates = 1
                                                          2014-09-2514:34:31:164 2881864AUAU initiated download, updateId = {572F9FE7-EA24-4C8F-9BB1-D76DA5DC8E95}.1, callId = {B72725E7-9E75-4E60-9F5C-30F723E71525}
                                                          2014-09-2514:34:31:164 2881864AUSetting AU scheduled install time to 2014-09-26 10:00:00
                                                          2014-09-2514:34:31:164 2881864AUSuccessfully wrote event for AU health state:0
                                                          2014-09-2514:34:31:164 2881864AUAU setting pending client directive to 'Download Progress'
                                                          2014-09-2514:34:31:165 2881864AUSuccessfully wrote event for AU health state:0
                                                          2014-09-2514:34:31:165 2881864AU  # Pending download calls = 1
                                                          2014-09-2514:34:31:165 2881864AU<<## SUBMITTED ## AU: Download updates
                                                          2014-09-2514:34:31:165 2881f34DnldMgr*************
                                                          2014-09-2514:34:31:165 2881f34DnldMgr** START **  DnldMgr: Downloading updates [CallerId = AutomaticUpdates]
                                                          2014-09-2514:34:31:165 2881f34DnldMgr*********
                                                          2014-09-2514:34:31:165 2881f34DnldMgr  * Call ID = {B72725E7-9E75-4E60-9F5C-30F723E71525}
                                                          2014-09-2514:34:31:165 2881f34DnldMgr  * Priority = 2, Interactive = 0, Owner is system = 1, Explicit proxy = 0, Proxy session id = -1, ServiceId = {3DA21691-E39D-4DA6-8A4B-B43877BCB1B7}
                                                          2014-09-2514:34:31:165 2881f34DnldMgr  * Updates to download = 1
                                                          2014-09-2514:34:31:165 2881f34Agent  *   Title = Microsoft Visual C++ 2012 Redistributable (x64) - 11.0.61030
                                                          2014-09-2514:34:31:165 2881f34Agent  *   UpdateId = {572F9FE7-EA24-4C8F-9BB1-D76DA5DC8E95}.1
                                                          2014-09-2514:34:31:165 2881864AUSuccessfully wrote event for AU health state:0
                                                          2014-09-2514:34:31:166 2881f34DnldMgr***********  DnldMgr: New download job [UpdateId = {572F9FE7-EA24-4C8F-9BB1-D76DA5DC8E95}.1]  ***********
                                                          2014-09-2514:34:31:167 288230cAUGetting featured update notifications.  fIncludeDismissed = true
                                                          2014-09-2514:34:31:167 288230cAUNo featured updates available.
                                                          2014-09-2514:34:31:178 288230cAUGetting featured update notifications.  fIncludeDismissed = true
                                                          2014-09-2514:34:31:178 288230cAUNo featured updates available.
                                                          2014-09-2514:34:31:208 2881f34DnldMgr  * All files for update were already downloaded and are valid.
                                                          2014-09-2514:34:31:210 2881f34Agent*********
                                                          2014-09-2514:34:31:210 2881f34Agent**  END  **  Agent: Downloading updates [CallerId = AutomaticUpdates]
                                                          2014-09-2514:34:31:210 2881f34Agent*************
                                                          2014-09-2514:34:31:210 2881864AU>>##  RESUMED  ## AU: Download update [UpdateId = {572F9FE7-EA24-4C8F-9BB1-D76DA5DC8E95}, succeeded]
                                                          2014-09-2514:34:31:210 2881864AU#########
                                                          2014-09-2514:34:31:210 2881864AU##  END  ##  AU: Download updates
                                                          2014-09-2514:34:31:210 2881864AU#############
                                                          2014-09-2514:34:31:210 2881864AUSetting AU scheduled install time to 2014-09-26 10:00:00
                                                          2014-09-2514:34:31:210 2881864AUSuccessfully wrote event for AU health state:0
                                                          2014-09-2514:34:31:210 2881864AUAU setting pending client directive to 'Install Approval'
                                                          2014-09-2514:34:31:211 2881f34ReportREPORT EVENT: {C036A5BC-0F79-4F0C-BCAC-9366BE75D1B6}2014-09-25 14:34:31:128-07001147101{00000000-0000-0000-0000-000000000000}00AutomaticUpdatesSuccessSoftware SynchronizationWindows Update Client successfully detected 1 updates.
                                                          2014-09-2514:34:31:211 2881f34ReportREPORT EVENT: {1D9C4A57-DB96-4D5C-AF58-BCB14F48F2F6}2014-09-25 14:34:31:129-07001156101{00000000-0000-0000-0000-000000000000}00AutomaticUpdatesSuccessPre-Deployment CheckReporting client status.
                                                          2014-09-2514:34:31:211 2881864AUSuccessfully wrote event for AU health state:0
                                                          2014-09-2514:34:31:211 2881f34ReportREPORT EVENT: {BDA900B8-11E3-4EE2-9C69-16EF18777D5A}2014-09-25 14:34:31:210-07001188102{00000000-0000-0000-0000-000000000000}00AutomaticUpdatesSuccessContent InstallInstallation Ready: The following updates are downloaded and ready for installation. This computer is currently scheduled to install these updates on ?Friday, ?September ?26, ?2014 at 3:00 AM:  - Microsoft Visual C++ 2012 Redistributable (x64) - 11.0.61030
                                                          2014-09-2514:34:31:212 288230cAUGetting featured update notifications.  fIncludeDismissed = true
                                                          2014-09-2514:34:31:212 288230cAUNo featured updates available.
                                                          2014-09-2514:34:31:212 2881f34ReportCWERReporter finishing event handling. (00000000)
                                                          2014-09-2514:34:36:211 2881f34ReportCWERReporter finishing event handling. (00000000)
                                                          2014-09-2514:34:46:170 288d00AULaunched new AU client for directive 'Install Approval', session id = 0x1
                                                          2014-09-2514:34:46:1749100143cMisc===========  Logging initialized (build: 7.6.7600.256, tz: -0700)  ===========
                                                          2014-09-2514:34:46:1749100143cMisc  = Process: C:\Windows\system32\wuauclt.exe
                                                          2014-09-2514:34:46:1749100143cAUClntLaunched Client UI process
                                                          2014-09-2514:34:46:1919100143cMisc===========  Logging initialized (build: 7.6.7600.256, tz: -0700)  ===========
                                                          2014-09-2514:34:46:1919100143cMisc  = Process: C:\Windows\system32\wuauclt.exe
                                                          2014-09-2514:34:46:1919100143cMisc  = Module: C:\Windows\system32\wucltux.dll
                                                          2014-09-2514:34:46:1919100143cCltUIAU client got new directive = 'Install Approval', serviceId = {3DA21691-E39D-4DA6-8A4B-B43877BCB1B7}, return = 0