/build/static/layout/Breadcrumb_cap_w.png

Sccm Collection/Query Help

Hi,
Hope someone can help me.. :)

I need to deploy flash player 10.0.32.18 (everything is packaged and ready to roll).. I want to build a dynamic collection that will target machines that have any version of flash player that is < 10.0.32.18 ...

The reason, is that we need an ongoing advert for this since older versions of flash were previously included in our RIS images...

I cannot figure out how to do a "<" when it comes to version from either Add/Remove programs or "installed software" tables... I think it is because these are not actually numbers... is there any way to convert this to a number so I can deploy this properly?

I really thought we were doing this in the past by doing a ... Where version0 < 10.0.32.18 ... but apparently not... If i do something like that I only get the version 10s of flash and nothing lowere...

Thanks,
Z

0 Comments   [ + ] Show comments

Answers (5)

Posted by: zshulko 14 years ago
Yellow Belt
0
Well .. This is what I have come up with... Really ugly, but seems to do the trick...
BTW.. the "_" was to account for an anomyly in our environment where we had some versions just showing up as "9"

Anyone see any issues with this?

Query Criteria
Installed Software.Product Name Is like "%Flash Player%"
And
(
Installed Software.Product Version Is like "[0-9].%"
Or
Installed Software.Product Version Is like "_"
Or
Installed Software.Product Version Is like "10.0.[0-2]_.%"
Or
Installed Software.Product Version Is like "10.0.3[0-1].%"
)

The whole SQL Query is...

select SMS_G_System_SYSTEM.Name, SMS_G_System_INSTALLED_SOFTWARE.ProductName, SMS_G_System_INSTALLED_SOFTWARE.ProductVersion from SMS_R_System inner join SMS_G_System_SYSTEM on SMS_G_System_SYSTEM.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_INSTALLED_SOFTWARE on SMS_G_System_INSTALLED_SOFTWARE.ResourceID = SMS_R_System.ResourceId where SMS_G_System_INSTALLED_SOFTWARE.ProductName like "%Flash Player%" and (SMS_G_System_INSTALLED_SOFTWARE.ProductVersion like "[0-9].%" or SMS_G_System_INSTALLED_SOFTWARE.ProductVersion = "_" or SMS_G_System_INSTALLED_SOFTWARE.ProductVersion like "10.0.[0-2]_.%" or SMS_G_System_INSTALLED_SOFTWARE.ProductVersion like "10.0.3[0-1].%")
Posted by: anonymous_9363 14 years ago
Red Belt
0
The problem, as you have discovered, is that version "numbers" aren't numbers but strings so cumbersome OR constructs are probably as good as any. I don't know enough SQL syntax to know but perhaps there's a means to use a regular expression which would make it tidier.

You may want to explore a different route, whereby you query the machine's registry for a different value. HKCR\Installer\Products\<PackedProductCode>\Version contains a hex value which you could use for an equality/less than/greater than comparison.
Posted by: Bobo 14 years ago
Orange Belt
0
We use this and it works for us:

SMS_G_System_ADD_REMOVE_PROGRAMS.Version < "3.2.7.1"

But could it be a problem with sort order?
9 is higher than 10

1
10
11
...
2
20
21
...
3
Posted by: zshulko 14 years ago
Yellow Belt
0
Yeah.. I think it is all based on the first character... Problem is that we have multiple acrobat readers in the environment...

9.0.x.x
8.0.x.x
10.0.22.x
10.0.32.xx

in a case like this, acording to what you are saying we would need something to conver them to something like the following in order to sort them properly... Just as cumbersome...

09.0.xx
08.0.xx
10.0.22.x
10.0.32.xx
Posted by: anonymous_9363 14 years ago
Red Belt
0
Even if you converted them, the version strings still wouldn't be numbers, making a '<' or '>' comparison pointless. Besides, I'd wager that a) '09' would convert to zero, since that's the leading digit and b) everything from the first decimal point and beyond would be ignored, meaning that 10.0.0.0 would be treated the same as 10.99.99.99.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ