/build/static/layout/Breadcrumb_cap_w.png

Problem using "ProductVersionGreaterThan" in Custom Inventory Rules

Hi,

I need to make a custom inventory rule for getting all PCs with an old Adobe Reader product version (nearly 700 PCs.. to check). The version reference that we are using now is Adobe Reader X (10.1.4)

 

I create a custom inventory rule (because a smart computer label with the search criterias "<" or ">" are not working well..), and when i m using "ProductVersionGreaterThan" the result give me nothing. I'm sure that i have more than 1 PC with the version 10.1.4 or greater.

Here my custom rule (For W7):

ProductVersionGreaterThan(C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe,10.1.3)

I put the number 10.1.3  to be sure to include the 10.1.4 Adobe Reader's versions.

Did I make a mistake on my rule ? It's also not working with others applications..

Thanks you for your answers

Best regards

KACE Agent version: K1000 - Version 5.3.53053 (Last version available)

OS: Windows 7 SP1 and Windows XP SP3


0 Comments   [ + ] Show comments

Answers (3)

Answer Summary:
Posted by: chucksteel 11 years ago
Red Belt
2

Software version numbers are a huge pain the butt, since they aren't actually numbers so the GreaterThan and LessThan rules don't work well. There are some hacks to get it working and most of them involve using smart labels. There was a tutorial on the old AppDeploy message boards with a good writeup on this. Perhaps someone can find it here.

Either way, using a smart label will probably work better for this than a custom inventory rule. 

Posted by: jverbosk 11 years ago
Red Belt
2

I agree with chucksteel that a smart label is the way to go.  I wrote an article on the setup, in case you're not familiar with them:

K1000 Labels - Effective Organization & Process Flow Using Manual, Smart & LDAP Labels and Label Groups

http://www.itninja.com/blog/view/k1000-labels-effective-organization-process-flow-using-manual-smart-ldap-labels-and-label-groups

Here's the actual smart label SQL code you'll want to use to list all machines running older versions of Adobe Reader (taken from the article above):

*label name*

old-ar(pre-10.1.4)

*SQL query*

select *, UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP(LAST_SYNC) as LAST_SYNC_TIME,
UNIX_TIMESTAMP(MACHINE.LAST_SYNC) as LAST_SYNC_SECONDS
from ORG1.MACHINE
LEFT JOIN KBSYS.KUID_ORGANIZATION
ON KUID_ORGANIZATION.KUID=MACHINE.KUID
LEFT JOIN KBSYS.SMMP_CONNECTION
ON SMMP_CONNECTION.KUID = MACHINE.KUID AND KUID_ORGANIZATION.ORGANIZATION_ID = 1
where ((  (1  in (select 1 from ORG1.SOFTWARE, ORG1.MACHINE_SOFTWARE_JT
where MACHINE.ID = MACHINE_SOFTWARE_JT.MACHINE_ID
and MACHINE_SOFTWARE_JT.SOFTWARE_ID = SOFTWARE.ID
and SOFTWARE.DISPLAY_NAME like 'Adobe Reader%'
and SOFTWARE.DISPLAY_VERSION RLIKE '(^[0-9][[.period.]])|(^10[[.period.]]0[[.period.]])|(^10[[.period.]]1[[.period.]][0-3]$)' )) ))
_________

Software Titles           where... SOFTWARE.DISPLAY_NAME like 'Adobe Reader%'
Software Version Number   and... SOFTWARE.DISPLAY_VERSION RLIKE (REGEX statement)

This label lists all machines with versions of Adobe Reader prior to 10.1.4 installed.

If you want a smart label to list all machines with the current version of Adobe Reader (10.1.4), use this:

*label name*

current-ar(10.1.4)

*SQL query*

select *, UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP(LAST_SYNC) as LAST_SYNC_TIME,
UNIX_TIMESTAMP(MACHINE.LAST_SYNC) as LAST_SYNC_SECONDS
from ORG1.MACHINE
LEFT JOIN KBSYS.KUID_ORGANIZATION
ON KUID_ORGANIZATION.KUID=MACHINE.KUID
LEFT JOIN KBSYS.SMMP_CONNECTION
ON SMMP_CONNECTION.KUID = MACHINE.KUID AND KUID_ORGANIZATION.ORGANIZATION_ID = 1
where ((  (1  in (select 1 from ORG1.SOFTWARE, ORG1.MACHINE_SOFTWARE_JT
where MACHINE.ID = MACHINE_SOFTWARE_JT.MACHINE_ID
and MACHINE_SOFTWARE_JT.SOFTWARE_ID = SOFTWARE.ID
and SOFTWARE.DISPLAY_NAME like 'Adobe Reader%'
and SOFTWARE.DISPLAY_VERSION RLIKE '(^10[[.period.]]1[[.period.]]4$)')) ))
_________

Software Titles           where... SOFTWARE.DISPLAY_NAME like 'Adobe Reader%'
Software Version Number   and... SOFTWARE.DISPLAY_VERSION RLIKE (REGEX statement)

This label lists all machines with Adobe Reader 10.1.4 installed.

Also, if you need help writing your own REGEX statements to target application versions (specific or ranged), see this:

Using REGEX in Smart Labels to Find Lower Versioned Software (w/Java Example)

http://www.itninja.com/blog/view/using-regex-in-smart-labels-to-find-lower-versioned-software-w-java-example

Hope that helps!

John

Posted by: CIAD 11 years ago
White Belt
1

Thanks you for your answers , But i finally find a solution to work with the custom inventory rule. It seems that KACE is interpretting the number of the version in a TEXT format and not a NUMBER format. It probably changed the method of the interpretation of the "ProductVersionGreaterThan".

Greetings !


Comments:
  • That makes sense because 10.1.3 isn't a discreet number. We see it as one but a computer won't because a number can't contain more than one period (and integers can't contain any). - chucksteel 11 years ago
  • Here some information about "ProductVersionGreaterThan" and "ProductVersionLessThan" :

    http://www.kace.com/en/support/resources/kb/article/what-is-the-syntax-for-custom-inventory-rules - CIAD 11 years ago

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