
Tanto per capire cosa abbiamo nel PC questo script fa un controllo dei drive (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.
Copia e incolla nel Blocco note (o altro editor di testo) e salva in .vbs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
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 |