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.
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.
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:
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.)
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.
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
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...
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...
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.
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
Package
Applicability Rules
Installed Rules
Registry of machine it's already installed on:
Registry of machine it's not installed on:
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.
Done ... same results, both see as wanting to install it.
Applicability Rules
Installed Rules
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.
Think I understood what you where asking for but just to verify, I updated it as follows and same results
Applicability Rules
Installed Rules
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.
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?
Again, the help is greatly appreciated and take your time as the weekend is upon us
-Charles
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.
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
Installed Rules
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-25 | 14:34:31:162 | 288 | 1864 | AU | Successfully wrote event for AU health state:0 | |||||||||||
2014-09-25 | 14:34:31:162 | 288 | 1864 | AU | Featured notifications is disabled. | |||||||||||
2014-09-25 | 14:34:31:162 | 288 | 1864 | AU | AU setting next detection timeout to 2014-09-26 01:18:46 | |||||||||||
2014-09-25 | 14:34:31:162 | 288 | 1864 | AU | Setting AU scheduled install time to 2014-09-26 10:00:00 | |||||||||||
2014-09-25 | 14:34:31:162 | 288 | 1864 | AU | Successfully wrote event for AU health state:0 | |||||||||||
2014-09-25 | 14:34:31:162 | 288 | 1864 | AU | Auto-approving update for download, updateId = {572F9FE7-EA24-4C8F-9BB1-D76DA5DC8E95}.1, ForUx=0, IsOwnerUx=0, HasDeadline=0, IsMinor=0 | |||||||||||
2014-09-25 | 14:34:31:162 | 288 | 1864 | AU | Auto-approved 1 update(s) for download (NOT for Ux) | |||||||||||
2014-09-25 | 14:34:31:162 | 288 | 1864 | AU | ############# | |||||||||||
2014-09-25 | 14:34:31:162 | 288 | 1864 | AU | ## START ## AU: Download updates | |||||||||||
2014-09-25 | 14:34:31:162 | 288 | 1864 | AU | ######### | |||||||||||
2014-09-25 | 14:34:31:162 | 288 | 1864 | AU | # Approved updates = 1 | |||||||||||
2014-09-25 | 14:34:31:164 | 288 | 1864 | AU | AU initiated download, updateId = {572F9FE7-EA24-4C8F-9BB1-D76DA5DC8E95}.1, callId = {B72725E7-9E75-4E60-9F5C-30F723E71525} | |||||||||||
2014-09-25 | 14:34:31:164 | 288 | 1864 | AU | Setting AU scheduled install time to 2014-09-26 10:00:00 | |||||||||||
2014-09-25 | 14:34:31:164 | 288 | 1864 | AU | Successfully wrote event for AU health state:0 | |||||||||||
2014-09-25 | 14:34:31:164 | 288 | 1864 | AU | AU setting pending client directive to 'Download Progress' | |||||||||||
2014-09-25 | 14:34:31:165 | 288 | 1864 | AU | Successfully wrote event for AU health state:0 | |||||||||||
2014-09-25 | 14:34:31:165 | 288 | 1864 | AU | # Pending download calls = 1 | |||||||||||
2014-09-25 | 14:34:31:165 | 288 | 1864 | AU | <<## SUBMITTED ## AU: Download updates | |||||||||||
2014-09-25 | 14:34:31:165 | 288 | 1f34 | DnldMgr | ************* | |||||||||||
2014-09-25 | 14:34:31:165 | 288 | 1f34 | DnldMgr | ** START ** DnldMgr: Downloading updates [CallerId = AutomaticUpdates] | |||||||||||
2014-09-25 | 14:34:31:165 | 288 | 1f34 | DnldMgr | ********* | |||||||||||
2014-09-25 | 14:34:31:165 | 288 | 1f34 | DnldMgr | * Call ID = {B72725E7-9E75-4E60-9F5C-30F723E71525} | |||||||||||
2014-09-25 | 14:34:31:165 | 288 | 1f34 | DnldMgr | * Priority = 2, Interactive = 0, Owner is system = 1, Explicit proxy = 0, Proxy session id = -1, ServiceId = {3DA21691-E39D-4DA6-8A4B-B43877BCB1B7} | |||||||||||
2014-09-25 | 14:34:31:165 | 288 | 1f34 | DnldMgr | * Updates to download = 1 | |||||||||||
2014-09-25 | 14:34:31:165 | 288 | 1f34 | Agent | * Title = Microsoft Visual C++ 2012 Redistributable (x64) - 11.0.61030 | |||||||||||
2014-09-25 | 14:34:31:165 | 288 | 1f34 | Agent | * UpdateId = {572F9FE7-EA24-4C8F-9BB1-D76DA5DC8E95}.1 | |||||||||||
2014-09-25 | 14:34:31:165 | 288 | 1864 | AU | Successfully wrote event for AU health state:0 | |||||||||||
2014-09-25 | 14:34:31:166 | 288 | 1f34 | DnldMgr | *********** DnldMgr: New download job [UpdateId = {572F9FE7-EA24-4C8F-9BB1-D76DA5DC8E95}.1] *********** | |||||||||||
2014-09-25 | 14:34:31:167 | 288 | 230c | AU | Getting featured update notifications. fIncludeDismissed = true | |||||||||||
2014-09-25 | 14:34:31:167 | 288 | 230c | AU | No featured updates available. | |||||||||||
2014-09-25 | 14:34:31:178 | 288 | 230c | AU | Getting featured update notifications. fIncludeDismissed = true | |||||||||||
2014-09-25 | 14:34:31:178 | 288 | 230c | AU | No featured updates available. | |||||||||||
2014-09-25 | 14:34:31:208 | 288 | 1f34 | DnldMgr | * All files for update were already downloaded and are valid. | |||||||||||
2014-09-25 | 14:34:31:210 | 288 | 1f34 | Agent | ********* | |||||||||||
2014-09-25 | 14:34:31:210 | 288 | 1f34 | Agent | ** END ** Agent: Downloading updates [CallerId = AutomaticUpdates] | |||||||||||
2014-09-25 | 14:34:31:210 | 288 | 1f34 | Agent | ************* | |||||||||||
2014-09-25 | 14:34:31:210 | 288 | 1864 | AU | >>## RESUMED ## AU: Download update [UpdateId = {572F9FE7-EA24-4C8F-9BB1-D76DA5DC8E95}, succeeded] | |||||||||||
2014-09-25 | 14:34:31:210 | 288 | 1864 | AU | ######### | |||||||||||
2014-09-25 | 14:34:31:210 | 288 | 1864 | AU | ## END ## AU: Download updates | |||||||||||
2014-09-25 | 14:34:31:210 | 288 | 1864 | AU | ############# | |||||||||||
2014-09-25 | 14:34:31:210 | 288 | 1864 | AU | Setting AU scheduled install time to 2014-09-26 10:00:00 | |||||||||||
2014-09-25 | 14:34:31:210 | 288 | 1864 | AU | Successfully wrote event for AU health state:0 | |||||||||||
2014-09-25 | 14:34:31:210 | 288 | 1864 | AU | AU setting pending client directive to 'Install Approval' | |||||||||||
2014-09-25 | 14:34:31:211 | 288 | 1f34 | Report | REPORT EVENT: {C036A5BC-0F79-4F0C-BCAC-9366BE75D1B6} | 2014-09-25 14:34:31:128-0700 | 1 | 147 | 101 | {00000000-0000-0000-0000-000000000000} | 0 | 0 | AutomaticUpdates | Success | Software Synchronization | Windows Update Client successfully detected 1 updates. |
2014-09-25 | 14:34:31:211 | 288 | 1f34 | Report | REPORT EVENT: {1D9C4A57-DB96-4D5C-AF58-BCB14F48F2F6} | 2014-09-25 14:34:31:129-0700 | 1 | 156 | 101 | {00000000-0000-0000-0000-000000000000} | 0 | 0 | AutomaticUpdates | Success | Pre-Deployment Check | Reporting client status. |
2014-09-25 | 14:34:31:211 | 288 | 1864 | AU | Successfully wrote event for AU health state:0 | |||||||||||
2014-09-25 | 14:34:31:211 | 288 | 1f34 | Report | REPORT EVENT: {BDA900B8-11E3-4EE2-9C69-16EF18777D5A} | 2014-09-25 14:34:31:210-0700 | 1 | 188 | 102 | {00000000-0000-0000-0000-000000000000} | 0 | 0 | AutomaticUpdates | Success | Content Install | Installation 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-25 | 14:34:31:212 | 288 | 230c | AU | Getting featured update notifications. fIncludeDismissed = true | |||||||||||
2014-09-25 | 14:34:31:212 | 288 | 230c | AU | No featured updates available. | |||||||||||
2014-09-25 | 14:34:31:212 | 288 | 1f34 | Report | CWERReporter finishing event handling. (00000000) | |||||||||||
2014-09-25 | 14:34:36:211 | 288 | 1f34 | Report | CWERReporter finishing event handling. (00000000) | |||||||||||
2014-09-25 | 14:34:46:170 | 288 | d00 | AU | Launched new AU client for directive 'Install Approval', session id = 0x1 | |||||||||||
2014-09-25 | 14:34:46:174 | 9100 | 143c | Misc | =========== Logging initialized (build: 7.6.7600.256, tz: -0700) =========== | |||||||||||
2014-09-25 | 14:34:46:174 | 9100 | 143c | Misc | = Process: C:\Windows\system32\wuauclt.exe | |||||||||||
2014-09-25 | 14:34:46:174 | 9100 | 143c | AUClnt | Launched Client UI process | |||||||||||
2014-09-25 | 14:34:46:191 | 9100 | 143c | Misc | =========== Logging initialized (build: 7.6.7600.256, tz: -0700) =========== | |||||||||||
2014-09-25 | 14:34:46:191 | 9100 | 143c | Misc | = Process: C:\Windows\system32\wuauclt.exe | |||||||||||
2014-09-25 | 14:34:46:191 | 9100 | 143c | Misc | = Module: C:\Windows\system32\wucltux.dll | |||||||||||
2014-09-25 | 14:34:46:191 | 9100 | 143c | CltUI | AU client got new directive = 'Install Approval', serviceId = {3DA21691-E39D-4DA6-8A4B-B43877BCB1B7}, return = 0 |
Just as on off the wall test I just set the Prerequisite Rule to Processor Architecture = ia64 and is still wants to install.
Maybe I'm still misunderstanding the rules, but if the Prereq doesn't fit the machine shouldn't it just stop there and not even bother evaluating the rest of the rules?
Just as on off the wall test I just set the Prerequisite Rule to Processor Architecture = ia64 and is still wants to install.
If that was your ONLY Prerequisite Rule, then something is definitely amiss.
Please do the following and I'll try to take a look at this over the weekend:
1. Send me the complete WindowsUpdate.log from that client.
2. Export your VCRedir package from PM. Go to the package, and use the "Export Catalog" action. I don't need the binary, so do not select the "Include downloaded package content" option.
3. Screencap the Update Details tab and the Revision History tab of the update published to WSUS.
Attach all three and send 'em to the email address in my Thwack profile.
Was just working on the log stuff, set it to verbose and just got done exporting both with and without.
I'll get them and the other requests right over.
Thanks
Same thing when I set the windows version to windows 2000 and I'm installing on windows 7, so I'm going to assume at this point it's not even checking for anything properly before it installs?
Further testing.
I uninstalled it from my machine, let windows update do the install, checked for updates and it shows up over and over again, even if I install it through wsus.
Of course it only is installed once in Programs and Features
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK® online community. More than 150,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process.