I prefer (and use) the following function :
Public Function GetDriveSerialNumber() As String
Dim DriveSerial As Integer
Dim fso As Object = CreateObject("Scripting.FileSystemObject")
Dim Drv As Object = fso.GetDrive(fso.GetDriveName(Application.StartupPath))
With Drv
If .IsReady Then
DriveSerial = .SerialNumber
Else
DriveSerial = -1
End If
End With
Return DriveSerial.ToString("X2")
End Function
Perhaps the Thread-Starter likes it too ...