Here's the code to get the harddisk S/N:
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
www.pcdatasheet.com
Code To Get The Hard Disk Serial Number
Private Declare Function getHarddiskSerialnumber 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 Form_Load()
On Error GoTo Err_Form_Load
Dim HDSNNum As Long
Dim VolName As String
Dim HarddiskSerialnumber As Long
Dim Maxlen As Long
Dim Sysflag As Long
Dim fsysName As String
HDSNNum = getHarddiskSerialnumber("c:\", VolName, 256, _
HarddiskSerialnumber, Maxlen, Sysflag, fsysName, 256)
MsgBox HDSNNum
Exit Sub
Err_Form_Load:
End Sub