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: 12.2   12.3   12.4   12.5   13.0   13.1   13.2   13.3   13.4   13.5    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 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

Example Databases

Blog Entries

This function checks for a license.

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


WMIQuery.PropertyValue - WMIQuery.Release

💬 Ask a question or report a problem