- Joined
- May 14, 2013
- Messages
- 5,416
- Reaction score
- 0
- Location
- The Netherlands.
- Website
- www.cpaelites.com
Hello all.
So basicly for school i needed to code a program wich shows the available space for every partition i have made in my laptop.
But when i run it all the partitions comes seperatley.
This is what i get:
Current code:
When i click on OK the first box dissapears and then the D partition comes up.
How can i get these to be displayed on one box?
Any help would be much appreciated.
Regards,
DutchPride
So basicly for school i needed to code a program wich shows the available space for every partition i have made in my laptop.
But when i run it all the partitions comes seperatley.
This is what i get:

Current code:
Code:
Const CONVERSION_FACTOR = 1048576
Computer = "."
Set objWMIService = GetObject("winmgmts://" & Computer)
Set colLogischeSchijf = objWMIService.InstancesOf ("Win32_LogicalDisk")
For Each objLogicalDisk in ColLogischeSchijf
FreeMegaBytes = objLogicalDisk.Freespace / CONVERSION_FACTOR
Wscript.Echo objLogicalDisk.DeviceID & " " & Int(FreeMegaBytes)
Next
When i click on OK the first box dissapears and then the D partition comes up.
How can i get these to be displayed on one box?
Any help would be much appreciated.
Regards,
DutchPride