Storage Location (Identity and Location)

Object Path: Overview

WMI classes and instances are identified and found with a formatted string the object path. Object paths are similar in construction to universal resource locators (URLs): they have a hierarchical format and contain an undetermined number of elements. Object paths can be absolute or relative.

An object path can contain the following information:

  • The server on which the class is located
  • The name space that contains the class
  • The name of the class
  • A key property that uniquely describes an instance of the class
  • A value for the key property

An absolute object path can look like this:
\\<Server>\<Namespace>:<Class>.<KeyName>="<KeyValue>"

Server

The computer on which the access occurs to access management information from a certain name space. The local computer is identified by a period:

\\.

Name Space

Name spaces bring classes and instances together in a logical unit. Each name space has a unique name:

  • The names space determines the validity and visibility of the classes contained.
  • A name space contains classes and instances that represent the objects for a specific "environment".

Name spaces can be nested hierarchically, similar to a directory structure with folders and subfolders, the name must be unique within a folder:

  • <Namespace1>\<Namespace2>\...\<LastNamespace>

All WMI installations contained four pre-defined name spaces:

  • Root. This name space does not itself contain any classes or another name spaces. The WMI installation creates the following three pre-defined name spaces within root.
  • Default contains most of the system classes.
  • Security contains classes and instances for the WMI security subsystem.
  • CimV2 contains objects of the Win32 environment, such as Win32_LogicalDisk and Win32_OperatingSystem. Most operations occur in the Root\CimV2 name space.

Key Property

WMI identified instances based upon keys or key properties. WMI keys are similar to keys of relational databases.

Object Path

WMI uses object paths to uniquely identify classes within a name space or instances of a class. Object paths are similar in construction to universal resource locators (URLs): they have a hierarchical format and contain an undetermined number of elements. An object path always contains the information of the name space.

In addition to the absolute paths there are also relative paths, which we will not discuss here in more detail.

Name Space Object Path

Localizes a certain name space on a server. The path has the following format:

\\<Server>\<Namespace>

or

//<Server>\<Namespace>

Server is the network name of the computer and the host that contains the name space. If it is a local computer, a period is sufficient in place of a net­work name:

\\.\<Namespace>

The following path localizes the name spaceRoot\Cimv2 on the local computer:
\\.\root\CimV2

Class Object Path

Localizes a certain class within a name space.
Format:

\\<Server>\<Namespace>:<Class>

The following path localizes the class Win32_LogicalDisk in the name space Root\Cimv2 on the server SV08:
\\SV08\Root\CimV2:Win32_LogicalDisk

Instance Object Path

Selects an instance of a certain class within a name space by appending the key property and the value to the path:

\\<Server>\<Namespace>:<Class>.<KeyName>="<KeyValue>"

Here relative paths are also possible:
The following relative paths each point to an instance in the current name space of the current computer:
PropName="E:"

or
ComPort=2


It is also possible to give the class name to localize the instance:
MyClass:PropName="E"