Hi, I'm a newbie to programming of any kind. I have posted this to other
groups in a hope to get a response from anyone.
Can any one tell me how to make my VB program read the Bios serial number
(or would HDD be better, or both?) and put that info into VB prog so the
program won't work on another computer. My program uses an MSAccess table.
Much appreciated if you can help!
Thanks
Gavin
Gavin
following the routine for your request
Sub serial()
drvpath = "c:"
Dim fs, d, s, t
Set fs = CreateObject("S cripting.FileSy stemObject")
Set d = fs.GetDrive(fs. GetDriveName(fs .GetAbsolutePat hName(drvpath)) )
Select Case d.DriveType
Case 0: t = "Desconocid o"
Case 1: t = "Separable"
Case 2: t = "Fijo"
Case 3: t = "Red"
Case 4: t = "CD-ROM"
Case 5: t = "Disco RAM "
End Select
s = "Unidad " & d.DriveLetter & ": - " & t
' this is a comment next line print out the hdd serial number
s = s & vbCrLf & "NS: " & d.serialnumber
MsgBox s
End Sub