Share via


Create a class

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

To create a class

  1. Open the Windows Management Instrumentation Tester dialog box.

  2. In the Windows Management Instrumentation (WMI) Tester dialog box, click Connect.

  3. In the Namespace box, type the path to the namespace that you want to connect to.

    Example?

    • To connect to the namespace where the Win32 provider classes reside, type:

      root\cimv2

  4. Click Connect.

  5. Click the Create Class button.

    • If you are creating a new base class, leave the Optional Superclass dialog box empty.

    • If you are specifying an existing class definition, the new class is based on the current namespace.

    • For example, if you specify Win32_LogicalDisk as the superclass, the new child class inherits the properties of the Win32_LogicalDisk class.

  6. Click Continue.

  7. In the Object Editor dialog box, select the __Class property.

  8. Select Edit Property.

  9. In the Property Editor dialog box, click Not Null and then type the name for the new class in the text box.

  10. Click Save Property.

  11. In the Object Editor dialog box, define the properties, qualifiers, and methods for the new class.

  12. Click Save Object to create the new class.

Notes

  • Performing this task on the local computer does not require you to have administrative credentials. Therefore, as a security best practice, consider performing this task as a user without administrative credentials.

  • Performing this task on a remote computer requires that you are a member of the Administrators group on the remote computer, or that you have been delegated the appropriate authority.

  • To open the Windows Management Instrumentation Tester dialog box, click Start, click Run, and then type WBEMTest.exe.

  • To use the Win32_LogicalDisk example above, you must be logged in to the root\cimv2 namespace.

  • You can create a new class definition in the current namespace by clicking Create Class in the Windows Management Instrumentation Tester dialog box.

Information about functional differences

  • Your server might function differently based on the version and edition of the operating system that is installed, your account permissions, and your menu settings. For more information, see Viewing Help on the Web.

See Also

Concepts

Object Editor dialog box
Property Editor dialog box