/build/static/layout/Breadcrumb_cap_w.png

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

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


1 Comment   [ + ] Show comment
  • 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) - RandomITdude24 5 years ago

Answers (1)

Answer Summary:
Posted by: JasonEgg 5 years ago
Red Belt
0

Top Answer

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..."

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

    Thanks, though! - kentwest 5 years ago
 
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