qfe

How do I check that a Windows QFE/patch has been installed from c#?

Deadly 提交于 2019-12-11 04:07:09
问题 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:

Querying WMI class Win32_QuickFixEngineering returns mucho weirdo timestamps (C#)

只谈情不闲聊 提交于 2019-12-11 00:15:54
问题 Class documentation here. The InstalledOn property is supposed to have a timestamp of (well, duh) when the fix was installed. But the doc doesn't say what's the format. I get something unintelligible, but it clearly means something. "01ca56402c180b70" is very obvious a hex number, but of what? And another thing: why do the first few items look like GUIDs? What do they mean? Da code: ManagementScope scope; ConnectionOptions options = new ConnectionOptions(); options.Username = tbUsername.Text;