NetXMS Support Forum

English Support => General Support => Topic started by: mcornille on September 27, 2013, 01:15:36 PM

Title: Check File Version
Post by: mcornille on September 27, 2013, 01:15:36 PM
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
Title: Re: Check File Version
Post by: Victor Kirhenshtein on September 29, 2013, 01:03:20 PM
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