 | | ASP |  |
 | | Listar drivers da maquina do cliente |  | Código JavaScript que lista os Drivers da maquina do cliente usando VBScriptEstá função VBscript não é de autoria minha.
<SCRIPT LANGUAGE=vbscript> 'Script to display a list of drives connected to this machine
Set FileSystemObject = CreateObject("Scripting.FileSystemObject") 'Create a filesystem object
Set Drives = FileSystemObject.Drives 'Create a drives collection
'step through the drive collection, and extract 'the drive letter and the type of drive 'according to the Microsoft VBScript documentation 'there are 6 distinct types of drive
For Each DiskDrive in Drives
DriveLetter = DiskDrive.DriveLetter DriveType = DiskDrive.DriveType
Select Case DriveType Case "0" DriveType = "Unknown type of drive" Case "1" DriveType = "Removable drive" Case "2" DriveType = "Fixed drive" Case "3" DriveType = "Network drive" Case "4" DriveType = "CD-ROM drive" Case "5" DriveType = "RAM Disk" End Select
document.write "Drive " & DriveLetter & " is a " & DriveType & "<BR>"
Next
Set Drives = nothing Set FileSystemObject = nothing
</SCRIPT>
[04/01/2007 11:20 - Fabrizio Gianfratti]
|