|
Vbscript / Operating System / Enumerate Disk Volumes
strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\" & strComputer & "
ootcimv2") Set colDisks = objWMIService.ExecQuery _ ("Select * from Win32_LogicalDisk") For each objDisk in colDisks If objDisk.DriveType = 3 Then Wscript.Echo "DeviceID: " & vbTab & objDisk.DeviceID End If Next
Please note that a disclaimer applies to any code on this page.
|
|
|