Hi guys
I'm trying to create a K1000 label based on pc's that have a certain folder installed on it

the location of the folder is...


(xxx is the user profile name)

any ideas on how to do this with a custom Inventory Rule or...?

The reason being is that the latest java is required for this to work, so I only want to update JAVA on the machines that have this folder on them

regards vince
0 Comments   [ + ] Show Comments


Please log in to comment


Custom rules run in the system context so enumerating user folders is better done with a script. If you are updating Java then why not look for the version of Java installed on the machine instead of looking at folders in a user's path?

Answered 07/20/2015 by: chucksteel
Red Belt

  • Or as Chuck says, do it in a script, so sort out the installation and then call it from within a script running only if the directory is found
  • that would have been ideal, however we use the same version of java throughout, but this folder requires the latest java v8.51 to work as it's a web app, whereas all the other machines we use v8.45 and wish to stick to it for now.
    • Just to understand: You have a web application that generates the folder in the user profile and you need to identify machines that are using that web application so that you can upgrade their java version. Is that correct?
      • That is correct
        the folder that is generated in the user profile is what I want to detect so I can update JAVA on that machine. But I want to create a label that has that folder on the machine
Please log in to comment
This command will find all instances of a folder on the machine:
dir foldername /s /b

You could use ShellCommandTextReturn(cmd.exe /c dir foldername /s /b) as your custom inventory rule and then create a smart label if the results include c:\users.

Answered 07/22/2015 by: chucksteel
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity