/build/static/layout/Breadcrumb_cap_w.png

Help to use Custom Inventory Rule

Hi all!

I've been racking my brain to make a list of devices that don't have a certain software file. I tried to do a CIR, but I don´´ have positive results.

Could you help me with list of devices that don't have a specific file?


Or I need to use the script module?

thanks!


0 Comments   [ + ] Show comments

Answers (4)

Posted by: Hobbsy 2 years ago
Red Belt
1

Or create the CIR to show the existence of the file, but as a software inventory item so FileExists as above and create a smart label that gathers machines that do not have the CIR software title.

Posted by: Cykosnake 2 years ago
White Belt
0

Found this CIR, gives you a yes or no:


ShellCommandTextReturn(>nul 2>nul dir /a-d "C:\Path\test.txt" && (echo Yes) || (echo No))

To check for a folder exists, use a * at the end. example, "c:\path\folder\*"


https://stackoverflow.com/questions/10813943/check-if-any-type-of-files-exist-in-a-directory-using-batch-script

Posted by: KevinG 2 years ago
Red Belt
0

What version of SMA, Agent, and OS of the device?


What Custom Inventory method are you using?  What are you checking?

Posted by: Nioky 2 years ago
Yellow Belt
0

I don't think that there is a CIR such as "FileDontExists()" (which will be great). I am also not aware of any negative parameter to inverse FileExists.


I thing the best way to do it is to create a script which check the presence of the file and place a marker (which can be then tested with a CIR).


regards



Comments:
  • FileExists(C:\WINDOWS\\notepad.exe)

    Returns a boolean (true or false) , so if false, the software item would not show that the device has the software item installed. - KevinG 2 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