Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ManagementObject.Options Property

Gets or sets additional information to use when retrieving the object.

[Visual Basic]
Public Property Options As ObjectGetOptions
[C#]
public ObjectGetOptions Options {get; set;}
[C++]
public: __property ObjectGetOptions* get_Options();
public: __property void set_Options(ObjectGetOptions*);
[JScript]
public function get Options() : ObjectGetOptions;
public function set Options(ObjectGetOptions);

Property Value

An ObjectGetOptions to use when retrieving the object.

Remarks

When the property is changed after the management object has been bound to a WMI object, the management object is disconnected from the original WMI object and later rebound using the new options.

Example

[C#] 
//Contains default options
ManagementObject o = new ManagementObject("MyClass.Name='abc'"); 

//Replace default options, in this case requesting retrieval of
//amended qualifiers along with the WMI object.
o.Options = new ObjectGetOptions(null, true);
   
[Visual Basic] 
'Contains default options
Dim o As New ManagementObject("MyClass.Name=""abc""")

'Replace default options, in this case requesting retrieval of
'amended qualifiers along with the WMI object.
o.Options = New ObjectGetOptions(null, true)
   

[C++, JScript] No example is available for C++ or JScript. To view a Visual Basic or C# example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

ManagementObject Class | ManagementObject Members | System.Management Namespace

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.