草庐IT

AutomaticUpdatesClass

全部标签

c# - 如何以编程方式更改 Windows 更新选项?

我目前正在尝试弄清楚如何在Windows8上将Windows更新设置为“让我选择是否安装”而不是“自动安装更新”。根据Checkfrom.NETifWindowsUpdateisenabled我试过:WUApiLib.AutomaticUpdatesClassauc=newWUApiLib.AutomaticUpdatesClass();//Doingsomestuff但是出现如下错误:Interoptype'WUApiLib.AutomaticUpdatesClass'cannotbeembedded.Usetheapplicableinterfaceinstead.Thetype'