/build/static/layout/Breadcrumb_cap_w.png

Scripting Question


How to Script a check for existence/non-existence of Software app?

05/24/2018 672 views
I have some printer drivers installed by a Canon UFRII installer routine, and I've created a Custom Inventory Rule (CIR) to mark a client machine as having X version of these drivers installed by parsing a .plist file deep in the Canon-related printer directories.

Now I need to write a script that tests to see if a client has that CIR or not, and I'm not able to think of or find a way of doing that.

In pseudo-code, it'd look something like:

if [ "CIR - Get Canon UFRII Driver version" = "10.14.0" ] then do X else do Y

Or, if I can check for a label,like:

if [ labels-on-this-client include "Has Canon UFRII 10.15.0 Driver" ] then do X else do Y


Any help?

Thanks!

/Kent

Answer Summary:
1 Comment   [ + ] Show comment

Comments

  • CIR can't be used like that in the KSMA, you would need to create a label to search for that CIR with the operator "software title" (if I'm not wrong)

Answer Chosen by the Author

0
As RandomITdude suggested, creating target label(s) would be the way to go. However, I would understand if you want to avoid that if you have (for example) 10 different scenarios for 10 different configurations leading to 10 different scripts doing similar things. In that case, you could have a job which creates a file/reg key with specific properties and use a built-in script function like "Verify a product version is exactly..." or "Verify a registry value is exactly..."
Answered 05/31/2018 by: JasonEgg
Red Belt

  • I resorted to just giving up on the CIR route, and writing a bash script to do what I need.

    Thanks, though!

Don't be a Stranger!

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

Sign up! or login

View more:

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