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


Date de création :12/08/2006 05:02 Dernière modification :12/08/2006 05:03