Not sure about the mother board serial number but here's a simple way to get HDD SN using GetVolumeInformation API.
All u'll need is a commandButton and a textBox for this one.
Compile to exe and move it around different drives to get the drive's S N.
Hope it helps...
VB Code:
Option Explicit Private Declare Function GetVolumeInformation Lib "kernel32" Alias _ "GetVolumeInformationA" _ (ByVal lpRootPathName As String, _ ByVal lpVolumeNameBuffer As String, _ ByVal nVolumeNameSize As Long, _ lpVolumeSerialNumber As Long, _ lpMaximumComponentLength As Long, _ lpFileSystemFlags As Long, _ ByVal lpFileSystemNameBuffer As String, _ ByVal nFileSystemNameSize As Long) As Long Private Sub Command1_Click() Dim Serial As Long Dim VName As String, drvlettr As String, FSName As String Dim lFs As Long VName = String$(255, Chr$(0)) FSName = String$(255, Chr$(0)) On Error GoTo ErrorHandler drvlettr = Left$(App.Path, 3) 'Get serial # from GetVolumeInformation API GetVolumeInformation drvlettr, VName, 255, Serial, 0, lFs, FSName, 255 Text1.Text = "The serial number of " & drvlettr & " is '" & Trim(Str$(Serial)) & "'" Exit Sub ErrorHandler: MsgBox "Error " & Err.Number & " (" & Err.Description & ")" End Sub




Reply With Quote