网友评分:
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