WMIQuery.Next
-------------

Queries the next item in the result of a query.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [WMIQuery](component_WMIQuery.md) | [5.2](newinversion52.md) | ❌ No | ✅ Yes | ❌ No | ✅ Yes, on Windows | ❌ No |

MBS( "WMIQuery.Next"; WMIQueryRef ) 

**MBS**( **"WMIQuery.Next";** /\* Queries the next item in the result of a query. \*/  
**$WMIQueryRef**) /\* The reference to the query. Create it with [WMIQuery.New](WMIQueryNew.md) and destroy them with [WMIQuery.Release](WMIQueryRelease.md).e.g. $ref \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| WMIQueryRef | The reference to the query. Create it with [WMIQuery.New](WMIQueryNew.md) and destroy them with [WMIQuery.Release](WMIQueryRelease.md). | $ref |

### Result

Returns OK, End of list or error.

### Description

Queries the next item in the result of a query.  
Returns OK if we have a next one or "End of list" in case of end.  
### See also

- [WMIQuery.Connect](WMIQueryConnect.md)
- [WMIQuery.New](WMIQueryNew.md)
- [WMIQuery.Release](WMIQueryRelease.md)

### Example Databases

- [Win Only/WMI Query](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Win%20Only/WMI%20Query.shtml#2ScriptAnchor_)

This function checks for a license.

Created 22nd June 2015 , last changed 22nd June 2015

  
[WMIQuery.New](WMIQueryNew.md) - [WMIQuery.PropertyNames](WMIQueryPropertyNames.md)

[HTML Version](WMIQueryNext.shtml)