free disk space, wmi version
free disk space, wmi version with C Sharp
using System;
using System.Management;
class DiskSpace
{
public static void Main (string[] argv)
{
ManagementObject disk = new ManagementObject("win32_logicaldisk.deviceid=\"c:\"");
disk.Get();
Console.WriteLine("Logical Disk Size = " + disk["Size"] + " bytes");
Console.WriteLine("Logical Disk FreeSpace = " + disk["FreeSpace"]+ " bytes");
}
}
Related posts:
- free disk space This example shows how to display the free disk space,...
- Disk drive info Set objWMIService = GetObject(”winmgmts:”) Set objLogicalDisk = objWMIService.Get(”Win32_LogicalDisk.DeviceID=’c:’”) Wscript.Echo “Total...
- Get disk info using VBScript and the FSO Get disk info using VBScript and the FSO Set objFso...
- perform a DNS query perform a DNS query on a domain name using C...
- find the hostname for a known IP address find the hostname for a known IP address with C...
Related posts brought to you by Yet Another Related Posts Plugin.






















