Hello,
There is currently no API function to get the hard disk size.
What you may want to do is create a "FileSystemObject" ActiveX object.
Here's a quick example:
var fso = new ActiveXObject("Scripting.FileSystemObject");
var space =fso.GetDrive("c:").AvailableSpace;
"space" will hold the free disk space for drive "c:" in bytes.
Do a google search on FileSystemObject for more information. Many of
the examples may be in VBScript, but the properties and methods should
be the same.
Cheers!
James
kurd...@gmail.com wrote:
Hi there. I'm trying to write a gadget to display various information
about users hard drive(s). How do I query the computer to display this
information? I thought something like:
HDspaceLeft=framework.system.device.physicaldisk.size-framework.system.device.physicaldisk.used
But I couldn't find anything online to show how to do this.
(I'm new to API/javascripting)
Thanks for your help.