Check File Version

Started by mcornille, September 27, 2013, 01:15:36 PM

Previous topic - Next topic

mcornille

Hi all,

I am going crazy on this. I want to get netxms agent collect the version of a file on a windows box:
this is the wmi query i use: WMI.Query(root\CIMV2,"SELECT Version FROM CIM_Datafile where name = 'C:\\Program Files\\Test Product\Product.exe'",Version)

but when i check the log file on the agent i get internal error.
So my questions are:

1) Is this the best way to get the file version or are there better options in netxms?
2) What is wrong

any info is welcome. thx in advance

Victor Kirhenshtein

Hi!

It works for me. I've configured DCI like

WMI.Query(root\CIMV2,"SELECT Version FROM CIM_Datafile where name = 'C:\\Program Files\\7-Zip\\7z.exe'",Version)

and got

9.20.0.0

as a value. Check that you didn't make any type - in your example one \ character is not doubled, if it is direct copy-paste from your config, most likely it is an issue.

Best regards,
Victor