Visual Basic .NET
Short Description
Due to popular demand, we have put together Visual Basic .NET versions of the source code in. Chapter 8. … Management namespace using Visual Basic .NET. …
Website: wbem.co.uk | Filesize: 18kb
Content
http://www.wbem.co.uk
Gwyn Cole Visual Basic .NET - Chapter 8 Samples Page 1 of 8
Visual Basic .NET
Chapter 8 Samples
Due to popular demand, we have put together Visual Basic .NET versions of the source code in
Chapter 8. All the information in Chapter 8 in “Developing WMI Solutions” is relevant to Visual Basic
.NET. Where you see major discussions in C#, substitute the code fragments below to understand the
System.Management namespace using Visual Basic .NET.
Page 349 - Management object retrieved implicitly
Dim mo As New ManagementObject(”Win32_Share.Name=”"C$”"”)
Console.WriteLine(”Win32_Share.Name=”"C$”" path is {0}”, mo(”Path”))
Page 349 - Management object retrieved explicitly
Dim mo As New ManagementObject(”Win32_Share.Name=”"C$”"”)
mo.Get() ‘Explicit
Console.WriteLine(”Win32_Share.Name=”"C$”" path is {0}”, mo(”Path”))
Page 352 - Management object retrieved from specific machine
Dim path As New ManagementPath
path.Path = “Win32_Share.Name=”"C$”"”
path.Server = “LISA”
path.NamespacePath = “rootCIMV2″
Dim mo As New ManagementObject(path)
Console.WriteLine(”Win32_Share.Name=”"C$”" path is {0}”, mo(”Path”))
Page 353…
Get the file Download here
Related Books:Related Searches: gwyn cole, share name, path server, quot quot, path path
Comments
Leave a Reply