Previous PageNext Page

8.7.9 SerialNumber Property

Returns the decimal serial number used to uniquely identify a disk volume. This property is not currently supported on UNIX.
 

Syntax

object.SerialNumber

Arguments

object
A Drive object.

Remarks

You can use the SerialNumber property to ensure that the correct disk is inserted in a drive with removable media.
 
The following code illustrates the use of the SerialNumber property:
 

Sub ShowDriveInfo(drvpath)

Dim fs, d, s, t

Set fs = CreateObject("Scripting.FileSystemObject")

Set d = fs.GetDrive(fs.GetDriveName(fs.GetAbsolutePathName(drvpath)))

Select Case d.DriveType

Case 0: t = "Unknown"

Case 1: t = "Removable"

Case 2: t = "Fixed"

Case 3: t = "Network"

Case 4: t = "CD-ROM"

Case 5: t = "RAM Disk"

End Select

s = "Drive " & d.DriveLetter & ": - " & t

s = s & vbCrLf & "SN: " & d.SerialNumber

Response.Write s

End Sub


Copyright © 2000 Chili!Soft

Previous PageTop Of PageNext Page