To generate strongly typed WMI classes, use the Management Strongly typed class generator (MgmtClassGen.exe). It's usually in C:Program FilesMicrosoft Visual Studio XSDKvXBin. The parameters are at MSDN and they even have a page describing the code generated. If you have to do a lot of work with WMI, it's a lifesaver.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…