Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2   11.3   11.4    Statistic    FMM    Blog  

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

Example Databases

Created 22nd June 2015, last changed 19th October 2017


WMIQuery.PropertyValue - WMIQuery.Release

Feedback: Report problem or ask question.