first of all i want thank the admins here for this nice and helpfully forms.
second: I am looking to put the end value of this code below in the TextBox.
end value i'm looking for it's : Serial Number.
second: I am looking to put the end value of this code below in the TextBox.
VB.NET:
Imports System
Imports System.Management
Imports System.Windows.Forms
Namespace WMISample
Public Class MyWMIQuery
Public Overloads Shared Function Main() As Integer
Try
Dim searcher As New ManagementObjectSearcher( _
"root\CIMV2", _
"SELECT * FROM Win32_CDROMDrive")
For Each queryObj As ManagementObject in searcher.Get()
Console.WriteLine("-----------------------------------")
Console.WriteLine("Win32_CDROMDrive instance")
Console.WriteLine("-----------------------------------")
Console.WriteLine("SerialNumber: {0}", queryObj("SerialNumber"))
Next
Catch err As ManagementException
MessageBox.Show("An error occurred while querying for WMI data: " & err.Message)
End Try
End Function
End Class
End Namespace
end value i'm looking for it's : Serial Number.