#167659 - 2006-09-14 05:54 PM
Re: Total Drive Space without WMI?
|
Witto
MM club member
   
Registered: 2004-09-29
Posts: 1828
Loc: Belgium
|
Just a quick search... Is it this what you are looking for? Enumerating Disk Space on a Computer
|
|
Top
|
|
|
|
#167662 - 2006-09-14 06:22 PM
Re: Total Drive Space without WMI?
|
Allen
KiX Supporter
   
Registered: 2003-04-19
Posts: 4562
Loc: USA
|
Just threw this together... requires WSHPipe(). Only tested with XP, so I can't be sure it works 100% with other OSs. Code:
? diskspace("C:") function $diskspace($drive) dim $lines $lines=wshpipe('%comspec% /c dir ' + $drive + '\',1) $diskspace=join(split(split(trim($lines[ubound($lines)-1])," ")[3],","),"") endfunction
{edit: Dang it... jumped the gun again... I thought you wanted free space... not total.}
Edited by Allen (2006-09-14 06:25 PM)
|
|
Top
|
|
|
|
#167664 - 2006-09-14 06:50 PM
Re: Total Drive Space without WMI?
|
Allen
KiX Supporter
   
Registered: 2003-04-19
Posts: 4562
Loc: USA
|
MSInfo32 may also work, but there is something lingering in the cob-webs of my head, that it relys on WMI too... anyway you might be able to use this and then get the info out of the text/report file it generates.
Code:
"C:\Program Files\Common Files\Microsoft Shared\MSInfo\msinfo32" /categories +ComponentsStorage /report c:\storage.txt
|
|
Top
|
|
|
|
#167665 - 2006-09-14 06:53 PM
Re: Total Drive Space without WMI?
|
Witto
MM club member
   
Registered: 2004-09-29
Posts: 1828
Loc: Belgium
|
Have been googling a bit. I can find you in no time the Windows Management Instrumentation (WMI) CORE 1.5 (Windows 95/98/NT 4.0) installer and a bunch of code using WMI. But what you're asking... I get the impression that WMI was born for your question, and before that, there was nothing...
|
|
Top
|
|
|
|
#167667 - 2006-09-15 05:32 AM
Re: Total Drive Space without WMI?
|
cj
MM club member
   
Registered: 2000-04-06
Posts: 1102
Loc: Brisbane, Australia
|
Heya,
If it helps, here's a little util to return the total drive size of a drive. usage:
DriveSize [[X:] [/comma]]
parameters (in any order) X: - the drive to check, valid input is a..z, colon must be present. If missing, C: is assumed
/comma - formats the output as 123,456,789 bytes. If missing output is 123456789 bytes.
If the drive doesn't exist (or is an empty CDROM) program returns -1
The output can be > to a file and read by kix, should be plenty of UDFs for that.
cj
|
|
Top
|
|
|
|
#167671 - 2006-09-15 11:10 AM
Re: Total Drive Space without WMI?
|
Björn
Korg Regular
   
Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
|
oh... Good luck with it (my head didn't wanna come along to work today...)
|
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
1 registered
(Allen)
and 1198 anonymous users online.
|
|
|