I have found a wmi script that will get the drive size, but it works half the time. it appears that if the drive is less than 10 gig it will not work. Here is the code
code:
$objWMIService = GetObject( "winmgmts://./root/cimv2" )
If @ERROR
GoTo ShowError
EndIf
$colItem1 = $objWMIService.ExecQuery( "Select * from Win32_Processor", , 48 )
$colItem2 = $objWMIService.ExecQuery( "Select * from Win32_LogicalMemoryConfiguration", , 48 )
$colItem3 = $objWMIService.ExecQuery( "Select * from Win32_DiskDrive", , 48 )
For Each $objItem In $colItem1
$clockspeed = $objItem.CurrentClockSpeed
Next
For Each $objItem In $colItem2
$memory=( ( $objItem.TotalPhysicalMemory + 1023 ) / 1024 )
Next
For Each $objItem In $colItem3
$Sice = $objItem.Size
$LSize = Len( $Sice )
$MSize = SubStr( $Sice, 1, $LSize - 3 )
$Size = ( 524288 + $MSize ) / 1048576
Next