NetXMS Support Forum

English Support => General Support => Topic started by: pzandvoort on March 23, 2018, 03:39:48 PM

Title: Parameters with quotes?
Post by: pzandvoort on March 23, 2018, 03:39:48 PM
Trying to run WMI.Query(/root/somenamespace, SELECT * FROM class WHERE name="value", property)
WQL needs the quotes, but by the time the query executes the quotes have been stripped. The same issue exists when trying to pass something in quotes to a ExternalParameter, or any parameter for that matter.

Is there a way to use quotes in parameters?

Going through the code, it seems the quotes are being removed in AgentGetParameterArg....
Title: Re: Parameters with quotes?
Post by: StanHubble on March 23, 2018, 07:00:26 PM
Yes you can....here is an example:

WMI.Query(root\cimv2, "select * from SoftwareLicensingProduct where partialproductkey like '%'" , LicenseFamily )
Title: Re: Parameters with quotes?
Post by: pzandvoort on March 23, 2018, 07:05:47 PM
I see what you're doing. Thanks!