Running the Supplied Code
The complete working code for this article is available with this article (see  in the "References" section at the end of the article). You should be able to use the supplied SharpDevelop solution.
If you prefer to build the source code, you just need to create a solution—I used SharpDevelop and created a console application. Just drop the two supplied source code files into your solution and remember to add a reference to the System.Management assembly. The latter is done in SharpDevelop by clicking Project->Add Reference and scrolling down to System.Management and clicking OK. Once this is done the project should build and run successfully.