Scripting Question

SMART labels based on Folder names

10/20/2015 1327 views
Hi All,

I'm wondering if this is possible somehow with KACE?
I'd like to apply SMART labels to devices based on the name of a folder within the Hard drive.
This folder name differentiates between five separate environments and based on the name I want to apply one or more SMART labels to it for organization.

I need to do this automated as manually it is a big mess right now as the IT group is not consistently updating labels manually and it is causing a problem when we are trying to deploy to one specific environment.

Thank you and please let me know if this is possible.
2 Comments   [ + ] Show comments


  • It would a two step process
    1. Use Custom Inventory Rules (CIR) to do a look up for "DirectoryExists(path)" and it will find the machines thaat have the path you put in between the (). If you aren't sure what CIR areor how to create them, the Admin Guide should help you out there. It is a manually created Software Title.

    2. Once you build the Software title with the CIR, you can then use a SMART label to look up the machines that have that CIR rule and apply a label that way.
  • Thank you very much for this and it does work as you are saying.

    I have one more thing to take it one step further as I found out that the directory I was targeting may or may not be accurate for the label.

    Is it possible to target a specific logfile and have Kace read a specific entry or value from the file and build a SMART label based on this?

    It looks like it is possible on the MAC side with the Plist entry but I can't find a corresponding value for the windows side. Thank you
    • in Windows, you would use either "FileInfoReturn()" if the log file is well-formed, else you could hack together something like: "ShellCommandTextReturn(cmd /c type "%SYSTEMROOT%\[
      YOUR_LOG_PATH]" | find "[YOUR_SEARCH]")"

Be the first to answer this question

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:


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