; Disk Storage =======================================================
$colItems = $objWMIService.ExecQuery("Select * from Win32_LogicalDisk",,48)
For Each $objItem in $colItems
If $objItem.DriveType = 3 ; fixed disk
$_SI[30] = $_SI[30] + ',' + $objItem.VolumeName
$_SI[31] = $_SI[31] + ',' + $objItem.Caption + '\'
$_SI[32] = $_SI[32] + ',' + $objItem.Caption
$_SI[33] = $_SI[33] + ',' + $objItem.Size
$_SI[34] = $_SI[34] + ',' + $objItem.FreeSpace
EndIf
If $objItem.DriveType = 5 ; CD-ROM
$_SI[35] = $_SI[35] + ',' + $objItem.Caption
EndIf
If $objItem.DriveType = 4 ; Network Drive
$_SI[36] = $_SI[36] + ',' + $objItem.Caption + '=' + $objItem.ProviderName
EndIf
Next
$colItems = 0
If $_OSVer > 5.1 ; only supported on W2K3 and higher - return mounted volume info
$colItems = $objWMIService.ExecQuery("Select * from Win32_Volume",,48)
For Each $objItem in $colItems
If $objItem.DriveType = 3 And $objItem.DriveLetter = ''
$_SI[30] = $_SI[30] + ',' + $objItem.Label
$_SI[31] = $_SI[31] + ',' + $objItem.Caption
$_SI[32] = $_SI[32] + ',' + 'MV:'
$_SI[33] = $_SI[33] + ',' + $objItem.Capacity
$_SI[34] = $_SI[34] + ',' + $objItem.FreeSpace
EndIf
Next
EndIf
$colItems = 0
; trim leading "," from strings
For $_ = 30 to 36
$_SI[$_] = SubStr($_SI[$_], 2)
Next
; Return the array
$WMISysInfo= $_SI
Exit 0
EndFunction