Hi,
You can use all of the methods that everyone has provided plus the
System.Environment to get basic information. I have posted a sample below
that shows the System.Environment and the System.Management classes (and a
link to the WMI Properties). From these you should be able to get anything
that you need.
Hope this helps
---------------------
//link for the WMI - Win32_LogicalDisk propertie
//
http://msdn.microsoft.com/library/d...s/wmisdk/wmi/win32_logicaldisk.asp?frame=true
//System.Environment information
String env_query = "My system drive is %PATHEXT% and my system root is
%SystemRoot%";
Console.WriteLine(Environment.ExpandEnvironmentVariables(env_query));
//System.Management - WMI Information
String strSQL = "SELECT * FROM Win32_LogicalDisk" ;
SelectQuery mgmt_query = new SelectQuery();
mgmt_query.QueryString = strSQL;
ManagementObjectSearcher searcher = new ManagementObjectSearcher(mgmt_query);
foreach(ManagementObject mo in searcher.Get())
{
if(mo["FreeSpace"] != null)
Console.WriteLine(mo["Name"].ToString() + " " +
mo["FreeSpace"].ToString());
}