Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

WMIQuery.Query

Executes a query.

Component Version macOS Windows Linux Server iOS SDK
WMIQuery 5.2 ❌ No ✅ Yes ❌ No ✅ Yes, on Windows ❌ No
MBS( "WMIQuery.Query"; WMIQueryRef; Query )   More

Parameters

Parameter Description Example
WMIQueryRef The reference to the query. Create it with WMIQuery.New and destroy them with WMIQuery.Release. $ref
Query The query to run. "SELECT * FROM Win32_Processor"

Result

Returns text or error.

Description

Executes a query.
Works in FileMaker 14, but fails in FileMaker 15/16 as MBS Plugin can’t upgrade security to administrator and most system queries need permissions.

see also
https://msdn.microsoft.com/en-us/library/aa392902(v=vs.85).aspx

Examples

Query network adapters:

MBS( "WMIQuery.Query"; $WMIQueryRef; "Select * from Win32_NetworkAdapter" )

Query details about operation system:

MBS( "WMIQuery.Query"; $WMIQueryRef; "Select * from Win32_OperatingSystem" )

Query event log:

MBS( "WMIQuery.Query"; $WMIQueryRef; "Select * from Win32_NTEventLogFile" )

See also

Release notes

  • Version 13.2
    • Fixed a problem where WMIQuery.Query would not report the error message.

Example Databases

Blog Entries

This function checks for a license.

Created 22nd June 2015, last changed 9th November 2021


WMIQuery.PropertyValue - WMIQuery.Release