/build/static/layout/Breadcrumb_cap_w.png

Create a label for machines that have a specific folder

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

c:\Users\xxx\AppData\Roaming\foldername

(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

Answers (2)

Posted by: chucksteel 8 years ago
Red Belt
0
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?


Comments:
  • 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 - Hobbsy 8 years ago
  • 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. - vjc 8 years ago
    • 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? - chucksteel 8 years ago
      • 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 - vjc 8 years ago
Posted by: chucksteel 8 years ago
Red Belt
0
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.

 
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