August 1999
Intermediate to advanced
1488 pages
72h 53m
English
driveobject.SerialNumber
The SerialNumber property of the Drive object contains the decimal serial number that uniquely identifies the specified disk volume.
Listing 9.34 displays the unique serial number of drive C.
<script language="JScript"> <!-- Hide //Create a string to hold the drive pathvar drivePath = "C:"; //Create a file system object var fileSysObj = new ActiveXObject("Scripting.FileSystemObject"); //Create a Drive object for drive C var drive = fileSysObj.GetDrive(fileSysObj.GetDriveName(drivePath)); //Display the serial number associated with the drive document.write("Drive serial number is ",drive.SerialNumber); //Hide End ... |
Read now
Unlock full access