Data Rule:
Good Day
Can anybody help me with a data rule that gets the size and date modified of test.dll found in c:\program files\temp\test.dll? Is it then possible to get a report that gives me this info for all my computers?
Regards,
burton
Answers (2)
You need to first create a custom inventory rule. I would recommend reading the relevant section in the administrators guide (In your K1000, click Help, Administrator Guide, Writing Custom Inventory Rules).
You would want to use FileInfoReturn to get the modified date, but that doesn't support getting the file size. I'm not sure you you would get that. Does the dll file include versions? If so that might be a better way to compare between machines.
Comments:
-
hi there
i have created a separate custom inventory rule
please assist me as i not winning with the fileinforeturn .dll file
this is what it looks like:
inventory rule:
FileInfoReturn(c:\program files\I-Systems\Scanning Client\ISystems.JDGroup.ScanningSolution.DealDocumentationPlugin.dll,ModifiedDate,Date)
I am not sure if the inventory rule is correct but any way what i am trying to achieve is to pull a report to see in the .dll file is installed or not in our Kace environment.
i can see that in the Smart lable contense that it is added as a Custom Field (name Deal Documentation)
and i can see that it is added to the Tab Reports Custom Field too
but it does not work
the dll file does not include file versions
Regards
burton - burtono 11 years ago-
After you created the custom inventory rule, did you force an update on a machine that has the DLL on it? Once you do that it should show up in the machine's inventory in Custom Inventory Fields. Check to see if it is there before trying to create a report. Depending on your check in interval it will be a while before all of your computers run the rule and populate the field. - chucksteel 11 years ago
-
yipeee!!!!
chucksteel i done it and it works
your cusome inventory rule should state the (date) the software was modified not Date
eg..............,ModifiedDate,2011/09/08)
When creating a smart labe be sure to use Software title (=) the title for the software dll
then use the next row begining with
OR Software title ( contains) or (does not contain) the title for the software
to search for the software
and yes you have to force an update that has dll file
Sorted
thanks for your help too - burtono 11 years ago
You can use this script in Powershell. This will get the file set on the first line. This will then output a txt file to c:\temp\test.txt with the file size and date modified. By default the file size will be in bytes. You can change to KB or MB depending on what you need by adding /1KB or /1MB to the end of $file.length on the 3rd line.
$file = Get-Item "c:\program files\temp\test.dll" #Change file name here as needed.
$outfile= "C:\TEMP\TEST.TXT"
$file.Length|Out-File "$outfile"
$file.LastWriteTime|Out-File "$outfile" -append
If you are using Kace you can then write a custom inventory rule to read that .txt file.
ShellCommandTextReturn(cmd.exe /c type C:\TEMP\TEST.TXT)
Comments:
-
-
yipeee!!!! Anwered
i done it and it works
your cusome inventory rule should state the (date) the software was modified not Date
eg..............,ModifiedDate,2011/09/08)
When creating a smart labe be sure to use Software title (=) the title for the software dll
then use the next row begining with
OR Software title ( contains) or (does not contain) the title for the software
to search for the software
and yes you have to force an update that has dll file
Sorted
thanks for your help too - burtono 11 years ago-
Did that get the size also? - dugullett 11 years ago
-
hi Dugullett
sorry not dude only the date
but i will work on it and let you know - burtono 11 years ago
chucksteel i done it and it works
your cusome inventory rule should state the (date) the software was modified not Date
eg..............,ModifiedDate,2011/09/08)
When creating a smart labe be sure to use Software title (=) the title for the software dll
then use the next row begining with
OR Software title ( contains) or (does not contain) the title for the software
to search for the software
and yes you have to force an update that has dll file
Sorted
thanks for your help too - burtono 11 years ago