feedback
tools

Archive

Posts Tagged ‘WQL’
e-mail

C# Detect Windows OS Version – Part 2 (WMI)

October 7th, 2009 6 comments

Recap

In case you missed Part 1, I briefly summarized 4 different strategies for programmatically determining the current Operating System in C#.  The code I posted there utilizes the System.Environment class.  It works great and is sufficient for most uses, but sometimes you want need to know everything about the OS, including the edition (i.e. "XP Pro" vs. "XP Home").

Summary

For that, Microsoft gives us the lovely Windows Management Instrumentation (WMI) Interface.  You can do a lot of really powerful and interesting things with WMI and WQL, but for this purpose, all we care about is getting some information from it.

Read more...

trademarks
feed