easiest to code the whole thing again:
Code:
$drives[0]
$Dsks = GetObject("winmgmts://$computername").ExecQuery("select * from Win32_DiskDrive")
if @error
"Error occured: " @error " " @serror ? "Press the anyKey to quit" get $key quit
endif
for each $Item in $Dsks
;dim again preserving the data that is in the array.
;redim with upper bound (the element amount) of array added by one.
redim preserve $drives[ubound($drives)+1]
$drives[ubound($drives)]= $Item.Size ;place the data to the last element
next
now to use it, remember that we created the array $drives[0] and never actually did place data to the first element, so to use it, don't reference invain the 0-element, which is empty but start from element 1.
_________________________
!download
KiXnet