Platforms to show: All Mac Windows Linux Cross-Platform

Back to WindowsWMIMBS class.

WindowsWMIMBS.CancelAsyncCall as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 12.0 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Stops events being delivered to this WindowsWMIMBS object.

Lasterror is set.

WindowsWMIMBS.ConnectServer(NetworkResource as string, Username as string="", Password as string="", Locale as string="", Authority as string="") as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 7.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Connect to WMI server.
Example
Var w as WindowsWMIMBS // your WMI object
call w.ConnectServer("root\cimv2")

Returns true on success and false on failure.
Authority parameter added in plugin version 12.2.

Some examples using this method:

WindowsWMIMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 12.2 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
The constructor.

WindowsWMIMBS.ExecNotificationQueryAsync(QueryLanguage as string, QueryText as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 12.0 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
The ExecNotificationQueryAsync method executes a query to receive events.

The plugin receives events and enqueues them in a queue. You read objects from this queue in a timer and process them.
NextItem returns nil if the queue is empty.

Returns true on success and false on failure.
Lasterror is set. e.g. &h80041018 if you have syntax error in the query or &h80041058 if the query can't be parsed.

Some examples using this method:

WindowsWMIMBS.InitAuthentication(User as string, Domain as string, Password as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 12.2 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Initializes authentication data.

Call before ConnectServer.
This settings are passed to objects for authentication.

Some examples using this method:

WindowsWMIMBS.NextItem as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 7.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Moves to next item in the list.

You need to call this at least once to move to the first item.
Returns false if no more items are there.

WindowsWMIMBS.Query(QueryLanguage as string, QueryText as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 7.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Runs a query.
Example
Var w as WindowsWMIMBS
call w.query("WQL","SELECT * FROM Win32_Processor")

Returns true on success and false on failure.

The items on this page are in the following plugins: MBS Win Plugin.


The biggest plugin in space...