is this code right for Windows PC to get serial number ?
it’s returning nothing at this time
Dim wmi As New WindowsWMIMBS
// Execute the WMI query for BIOS serial number
If wmi.ConnectServer("root\cimv2") Then
If wmi.Query("WQL", "SELECT SerialNumber FROM Win32_BIOS") Then
// Get the serial number if available
If wmi.NextItem Then
SerialPC = wmi.GetPropertyString("SerialNumber").Trim
End If
End If
End If
2 posts - 2 participants