PDA

View Full Version : Size of a disk?



ifym
04-02-2003, 05:55 AM
can somebody tell me how to find the size of a disk with wmi?
set refDrive= getobject("winmgmts:win32_logicaldisk='c:' ")
wscript.echo "your drive is "&refdrive.size &" bytes"

this is all i can find, but that would give you the size of the partition, i need the size of the hard disk. Thanks

Andy-S
04-02-2003, 07:35 AM
See if this helps:

<a target="_blank" href=http://www.mvps.org/vbnet/index.html?code/wmi/wmidiskdrive.htm>http://www.mvps.org/vbnet/index.html?code/wmi/wmidiskdrive.htm</a>

Cheers
Andy

ifym
04-02-2003, 09:44 AM
yea i actually just found that link off of google, thanks. that looks like that should do it. What i want to do is get a list of pc's in the domain that have hard drives less then 2gb, i just wasnt sure how to get the size of the hard drive. Thanks