How do I check that a Windows QFE/patch has been installed from c#?
问题 What's the best way in c# to determine is a given QFE/patch has been installed? 回答1: Use WMI and inspect the Win32_QuickFixEngineering enumeration. From TechNet: strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colQuickFixes = objWMIService.ExecQuery _ ("Select * from Win32_QuickFixEngineering") For Each objQuickFix in colQuickFixes Wscript.Echo "Computer: " & objQuickFix.CSName Wscript.Echo "Description: