News:

We really need your input in this questionnaire

Main Menu

Parameters with quotes?

Started by pzandvoort, March 23, 2018, 03:39:48 PM

Previous topic - Next topic

pzandvoort

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....

StanHubble

Yes you can....here is an example:

WMI.Query(root\cimv2, "select * from SoftwareLicensingProduct where partialproductkey like '%'" , LicenseFamily )

pzandvoort

I see what you're doing. Thanks!