This is work in progress, but it may give you some clues, as I'm working towards the same objective. Function dependencies are wmiquery(), words(), word() which you can find in the UDF forum on this BB.
code:
;
;local disk info
$numparts=WMIQuery("Partitions","Win32_DiskDrive","$machine")
$disksize=WMIQuery("Size","Win32_DiskDrive","$machine")
$index1=0
FOR EACH $item IN SPLIT(WMIQuery("DriveType","Win32_LogicalDisk","$machine"),"|")
$index1=$index1+1
IF TRIM($item) == "3"
$disktype=$disktype+" "+$item
$index2=0
FOR EACH $item IN SPLIT(WMIQuery("DeviceID","Win32_LogicalDisk","$machine"),"|")
$index2=$index2+1
IF $index1==$index2
$diskid=$diskid+" "+$item
$index3=0
FOR EACH $item IN SPLIT(WMIQuery("FreeSpace","Win32_LogicalDisk","$machine"),"|")
$index3=$index3+1
IF $index1==$index3
$diskfree=$diskfree+" "+$item
$index4=0
FOR EACH $item in SPLIT(WMIQuery("FileSystem","Win32_LogicalDisk","$machine"),"|")
$index4=$index4+1
IF $index1=$index4
$filesys=$filesys+" "+$item
ENDIF
NEXT
ENDIF
NEXT
ENDIF
NEXT
ENDIF
NEXT
;?? "TEST OUTPUT"
? "total local disk size = "$disksize" Bytes"
? "number of disk partitions = "$numparts
;rearrange the strings
$m=""
for $j = $numparts to 1 step -1
$m = $m +" "+word($disktype,$j)
next
$disktype=$m
? "local disk type(s) = "$disktype
$m=""
for $j = $numparts to 1 step -1
$m = $m +" "+word($diskid,$j)
next
$diskid=$m
? "local disk name(s) = "$diskid
$m=""
for $j = $numparts to 1 step -1
$m = $m +" "+word($diskfree,$j)
next
$diskfree=$m
? "local disk free space(s) = "$diskfree" Bytes"
$m=""
for $j = $numparts to 1 step -1
$m = $m +" "+word($filesys,$j)
next
$filesys=$m
? "local disk file system(s) = "$filesys
;
Hope this helps... ![[Smile]](images/icons/smile.gif)
[ 20. September 2002, 21:55: Message edited by: Waltz ]