網友評分: 5分
Physical Disk Properties這工具能夠快速檢測顯示你的物理驅動器信息,物理驅動器指實際安裝的驅動器,你的電腦里的硬盤就是一個典型的物理驅動器。同時這個工具還可以檢測你的光驅以及軟驅。
1、運行后即可檢測顯示信息,包括容量大小,磁盤類型等
'Physical Disk Properties
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\" & strComputer & "\root\cimv2")
Set colDiskDrives = objWMIService.ExecQuery _
("Select * from Win32_DiskDrive")
For each objDiskDrive in colDiskDrives
Wscript.Echo "Caption: " & vbTab & objDiskDrive.Caption & vbCrLf & _
"Device ID: " & vbTab & objDiskDrive.DeviceID & vbCrLf & _
"Index: " & vbTab & objDiskDrive.Index & vbCrLf & _
"Interface Type: " & vbTab & objDiskDrive.InterfaceType & vbCrLf & _
"Manufacturer: " & vbTab & objDiskDrive.Manufacturer & vbCrLf & _
"Media Loaded: " & vbTab & objDiskDrive.MediaLoaded & vbCrLf & _
"Media Type: " & vbTab & objDiskDrive.MediaType & vbCrLf & _
"Model: " & vbTab & objDiskDrive.Model & vbCrLf & _
"Name: " & vbTab & objDiskDrive.Name & vbCrLf & _
"Partitions: " & vbTab & objDiskDrive.Partitions & vbCrLf & _
"PNP DeviceID: " & vbTab & objDiskDrive.PNPDeviceID & vbCrLf & _
"SCSI Bus: " & vbTab & objDiskDrive.SCSIBus & vbCrLf & _
"SCSI Logical Unit: " & vbTab & _
objDiskDrive.SCSILogicalUnit & vbCrLf & _
"SCSI Port: " & vbTab & objDiskDrive.SCSIPort & vbCrLf & _
"SCSI TargetId: " & vbTab & objDiskDrive.SCSITargetId & vbCrLf & _
"Sectors Per Track: " & vbTab & _
objDiskDrive.SectorsPerTrack & vbCrLf & _
"Size: " & vbTab & objDiskDrive.Size & vbCrLf & _
"Status: " & vbTab & objDiskDrive.Status & vbCrLf & _
"Total Cylinders: " & vbTab & _
objDiskDrive.TotalCylinders & vbCrLf & _
"Total Heads: " & vbTab & objDiskDrive.TotalHeads & vbCrLf & _
"Total Sectors: " & vbTab & objDiskDrive.TotalSectors & vbCrLf & _
"Total Tracks: " & vbTab & objDiskDrive.TotalTracks & vbCrLf & _
"Tracks Per Cylinder: " & vbTab & _
objDiskDrive.TracksPerCylinder
Next