Willy Denoyette [MVP]
7/20/2002 10:47:00 AM
Use the System.Management namespace classes and WMI.
<C# snippet>
...
SelectQuery query = new SelectQuery("Win32_OperatingSystem");
ManagementObjectSearcher searcher = new ManagementObjectSearcher( query);
foreach (ManagementObject mo in searcher.Get())
Console.WriteLine("OS Version: {0} - SP {1} ",
mo["Version"].ToString(),mo["ServicePackMajorVersion"].ToString()) ;
}
....
Willy.
"Ever Olano" <ever@nospam.com> wrote in message news:177c701c22f3b$b8ed2380$a5e62ecf@tkmsftngxa07...
> Hi. I can programmatically get the platform and the
> version of the OS. Is there a way to also get any Service
> Pack information?
>
> Thanks,
> Ever