OS name
Add a .NET reference to Microsoft.VisualBasic. Then call:
new Microsoft.VisualBasic.Devices.ComputerInfo().OSFullName
From MSDN:
This property returns detailed information about the operating system
name if Windows Management Instrumentation (WMI) is installed on the
computer. Otherwise, this property returns the same string as the
My.Computer.Info.OSPlatform property, which provides less detailed
information than WMI can provide.information than WMI can provide.
Disk space
private long GetTotalFreeSpace(string driveName)
{
foreach (DriveInfo drive in DriveInfo.GetDrives())
{
if (drive.IsReady && drive.Name == driveName)
{
return drive.TotalSize;
}
}
return -1;
}
CPU usage
You can use the PerformanceCounter class from System.Diagnostics.
Initialize like this:
PerformanceCounter cpuCounter;
cpuCounter = new PerformanceCounter("Processor", "% Processor Time", "_Total");
Consume like this:
public string getCurrentCpuUsage(){
return cpuCounter.NextValue()+"%";
}
Referances
How to get OS name?
How to get disk space?
How to get CPU usage?