Returns Serial Number of a drive.
DriveGetSerial ( "path" )
path | Path of drive to receive information from. |
Success: | the Serial Number of the drive as a string. |
Failure: | sets the @error flag to 1. |
The value returned is not the hardware serial number as found on the label of the drive, it is the Windows Volume ID for the drive.
DriveGetDrive, DriveGetFileSystem, DriveGetLabel, DriveGetType, DriveSetLabel, DriveSpaceFree, DriveSpaceTotal, DriveStatus
#include <MsgBoxConstants.au3>
Local $sSerial = DriveGetSerial(@HomeDrive & "\") ; Find the serial number of the home drive, generally this is the C:\ drive.
MsgBox($MB_SYSTEMMODAL, "", "Serial Number: " & $sSerial)