Export (0) Print
Expand All

Document Conventions for the Scripting API

The Scripting API for WMI reference uses the following document conventions:

  • Parameter types are defined using a prefix: b (Boolean), str (string), I (integer), obj (Automation object), var (Variant).
  • Optional parameters are placed in square brackets with their default values shown by assignment.
  • In the case of object parameters, the characters after the "obj" prefix indicate the type of object expected.
Object parameterObject type
WbemDatetime SWbemDateTime
WbemEventSource SWbemEventSource
WbemLocator SWbemLocator
WbemMethod SWbemMethod
WbemMethodSet SWbemMethodSet
WbemNamedValueSet SWbemNamedValueSet
WbemObject SWbemObject
WbemObjectEx SWbemObjectEx
WbemObjectPath SWbemObjectPath
WbemObjectSet SWbemObjectSet
WbemPrivilege SWbemPrivilege
WbemPrivilegeSet SWbemPrivilegeSet
WbemProperty SWbemProperty
WbemPropertySet SWbemPropertySet
WbemQualifier SWbemQualifier
WbemQualifierSet SWbemQualifierSet
WbemRefreshableItem SWbemRefreshableItem
WbemRefresher SWbemRefresher
WbemServices SWbemServices
WbemServicesEx SWbemServicesEx

 

For example, the following code shows how to name variables for different types of objects:

strComputerName  ' a string value for a computer name
bStatusFlag  ' a boolean value used for a status
objServices  ' an object value used to store an SWbemServices value

 

 

Show:
© 2014 Microsoft