This documentation is archived and is not being maintained.

ManagementPath Class

Provides a wrapper for parsing and building paths to WMI objects.

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

<TypeConverterAttribute(GetType(ManagementPathConverter))> _
Public Class ManagementPath
	Implements ICloneable
Dim instance As ManagementPath

/** @attribute TypeConverterAttribute(System.Management.ManagementPathConverter) */ 
public class ManagementPath implements ICloneable
public class ManagementPath implements ICloneable
Not applicable.

The following example demonstrates how the ManagementPath class parses a path to a WMI object. The path that is parsed in the example is a path to an instance of a class.

Imports System
Imports System.Management

Public Class Sample
    Public Overloads Shared Function _
        Main(ByVal args() As String) As Integer

        ' Get the WMI class path
        Dim p As ManagementPath = _
            New ManagementPath( _
            "\\ComputerName\root" & _

        Console.WriteLine("IsClass: " & _
        ' Should be False (because it is an instance)

        Console.WriteLine("IsInstance: " & _
        ' Should be True

        Console.WriteLine("ClassName: " & _
        ' Should be "Win32_LogicalDisk"

        Console.WriteLine("NamespacePath: " & _
        ' Should be "ComputerName\cimv2"

        Console.WriteLine("Server: " & _
        ' Should be "ComputerName"

        Console.WriteLine("Path: " & _
        ' Should be "ComputerName\root\cimv2:
        ' Win32_LogicalDisk.DeviceId="C:""

        Console.WriteLine("RelativePath: " & _
        ' Should be "Win32_LogicalDisk.DeviceID="C:""

    End Function
End Class


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0