ManagementObject.Path Property

 

Gets or sets the object's WMI path.

Namespace:   System.Management
Assembly:  System.Management (in System.Management.dll)

abstract Path : ManagementPath with get, set
override Path : ManagementPath with get, set

Property Value

Type: System.Management.ManagementPath

A ManagementPath representing the object's path.

Changing the property after the management object has been bound to a WMI object in a particular namespace results in releasing the original WMI object. This causes the management object to be rebound to the new object specified by the new path properties and scope values.

The rebinding is performed in a "lazy" manner, that is, only when a requested value requires the management object to be bound to the WMI object. Changes can be made to more than just the property before attempting to rebind (for example, modifying the scope and path properties simultaneously).

Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.

The following example initializes a new instance of the ManagementObject class with the default namespace, and then changes the WMI path of the ManagementObject.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: