FAQ
Système
Cocher la référence 'Microsoft Scripting Runtime'
Function ReadHDSerial(Optional strHD As String = "C:") As Long
On Error GoTo read_error
Dim fso As New Scripting.FileSystemObject
ReadHDSerial = Abs(fso.Drives(strHD).SerialNumber)
read_exit:
Exit Function
read_error:
ReadHDSerial = 0
Resume read_exit
End Function