Compare a Registry value
Hello,
I'm working on building a script to push out .NET 4.5.2 to a group of our machines, but only if the computer has a prior 4.5 release. I'm using the information here to get the actual version I'm checking for:
https://msdn.microsoft.com/en-us/library/hh925568(v=vs.110).aspx
I'm creating a verification step to verify a registry value is less than...
Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full
Name: Release
Value: 379873
However - it doesn't seem to matter what the value is, it always fails the check. Even if I manually edit that value on a target machine to a value < the value I'm checking for, it will fail. What am I missing? If I take that verification step out altogether, it will run of course.
I realize that if that version of the .NET Framework is already installed, a silent execution of it will just abort w/o actually trying to install it - but that requires extracting the package to each machine before that step is done, so basically I'm just trying to speed the process up.
Thanks,
James
Answers (1)
Comments:
-
Refer to my comment above; it wouldn't let me reply directly to your comment. Thanks! - JLankford 8 years ago
Under the Tasks section, Task 1, under the Verify action, I 'Add' a step to 'Verify a registry value is less than...', and then provide the values - basically filling in the blanks - with the info from my original post:
Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full
Name: Release
Value: 379893
On machines where the Value is less than what I'm checking for (379893), it continually fails - even if I modify the registry setting on the target computer to be significantly lower than the value I'm comparing against.
However, if I change the step to 'Verify a registry value is exactly...', and then run it again a machine it will evaluate correctly - meaning if the target machine's value is 379893, the step will pass; otherwise it will fail, as it should.
Does this help explain? - JLankford 8 years ago
I test with our K1000 6.4 SP2, and it works.
Can't help more... - gwir 8 years ago