Win32_diskdrive Serial Number

Imports System.Management Public Class Form1 Private Sub Form1_Load( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim HDD_Serial, MB_serial As String Dim hdd As New ManagementObjectSearcher( 'select * from Win32_DiskDrive') For Each hd In hdd. Final Fantasy Ix Ost Rar. Get HDD_Serial = hd( 'SerialNumber') Next Dim mboard As New ManagementObjectSearcher( 'select * from Win32_BaseBoard') For Each mb In mboard. Get MB_serial = mb( 'SerialNumber') Next End Sub End Class thank dear but there are errors in codes: Error 1 Type 'ManagementObjectSearcher' is not defined. C: Users Sh2007 Desktop hdd hdd Form1.vb 6 20 hdd Error 3 Statement cannot appear outside of a method body/multiline lambda. C: Users Sh2007 Desktop hdd hdd Form1.vb 9 5 hdd please help me. Private Sub Form7_Load(sender As Object, e As System.EventArgs) Handles Me.Load Dim HDD_Serial, MB_serial As String Dim hdd As New ManagementObjectSearcher( 'select * from Win32_DiskDrive') For Each hd In hdd. Get HDD_Serial = hd( 'SerialNumber') Next Dim mboard As New ManagementObjectSearcher( 'select * from Win32_BaseBoard') For Each mb In mboard. Get MB_serial = mb( 'SerialNumber') Next MsgBox(MB_serial) End Sub Please mark those posts as answer which answers your question. Faraz thanks dear for your help but HDD_Serial is empty please check and help me .

Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click Dim Searcher_p As New ManagementObjectSearcher( 'root CIMV2', 'SELECT * FROM Win32_DiskDrive') For Each queryObj As ManagementObject In Searcher_p. Get() TextBox1.Text += (queryObj( 'SerialNumber').ToString.Trim) Next End Sub What is your main objective? What do you want to do with these serial number? (Maybe there are better options available ) Please mark those posts as answer which answers your question.

Win32_diskdrive Serial NumberDisk Drive Serial Number

Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click Dim Searcher_p As New ManagementObjectSearcher( 'root CIMV2', 'SELECT * FROM Win32_DiskDrive') For Each queryObj As ManagementObject In Searcher_p. Get() TextBox1.Text += (queryObj( 'SerialNumber').ToString.Trim) Next End Sub What is your main objective?

Map Volume Serial Number to physical disk drive. Therefore I want to get serial number of the. But in this case that Win32_DiskDrive looks like it might be. The Serial number property is a manufacturer-allocated number. The Win32_DiskDrive class represents a physical disk drive as seen by a. Jul 23, 2017 Solution: Are these physical hard drives and not virtual disks? Does the serial number show up correctly if you use this instead:WMIC path win32_physicalmedia. Map Volume Serial Number to physical disk drive. Therefore I want to get serial number of the disk. Win32_DiskDrive __SUPERCLASS: CIM.

What do you want to do with these serial number? (Maybe there are better options available ) Please mark those posts as answer which answers your question. Faraz thanks dear please see the picture there is an error Name of Allah, Most Gracious, Most Merciful and He created the human. Imports System.Management Public Class Form1 Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Searcher_P As New ManagementObjectSearcher( 'SELECT * FROM Win32_BaseBoard') For Each queryObj As ManagementObject In Searcher_P. Get() MsgBox(queryObj( 'SerialNumber').ToString.Trim) Next End Sub Private Sub Button2_Click( ByVal sender As System.Object, ByVal e As System. Black Ops 1 Dlc Pack. EventArgs) Handles Button2.Click Dim Searcher_p As New ManagementObjectSearcher( 'root CIMV2', 'SELECT * FROM Win32_DiskDrive') For Each queryObj As ManagementObject In Searcher_p.