COME VISUALIZZARE LE CARATTERISTICHE DEL DISCO RIGIDO
Tanto per capire cosa abbiamo nel PC questo script vbs fa un controllo dei drive, le unità ed elenca le loro caratteristiche nel seguente modo:
- Lettera dell’unità;
- Tipo (file system);
- Numero di serie;
- Nome del volume;
- Dimensioni effettive;
- Spazio disponibile.
Codice
Copia e incolla nel Blocco note (o altro editor di testo) e salva in .vbs
Dim oFS, oDrive, sOutput
Set oFS = CreateObject("Scripting.FileSystemObject")
For Each oDrive In oFS.Drives
With oDrive
If .IsReady Then
sOutput = "Unità: " & .DriveLetter & vbCRLF
sOutput = sOutput & " Tipo: " & .FileSystem & vbCRLF
sOutput = sOutput & " Numero di Serie: " & .SerialNumber & vbCRLF
sOutput = sOutput & " Nome del Volume: " & .VolumeName & vbCRLF
sOutput = sOutput & " Dimensioni: " & Round((.TotalSize / 1073741824), 2) & "GB" & vbCRLF
sOutput = SOutput & " Spazio disponibile: " & Round((.AvailableSpace / 1073741824), 2) & "GB" & vbCRLF
WScript.Echo sOutput
else
WScript.Echo "Unità: " & .DriveLetter & " non pronta"
End If
End With
Next
5/5 - (1 voto)





