Is there any way to download Windows updates programmatically from within a C# application? I want to manage the installation of updates from within my application.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
The Windows Update API is documented here. A quick stackoverflow search has convinced me that you can indeed use COM from C# so this should solve your problem.
I also have some sample code, not in C#, but it may give you a head start in understanding how the interfaces can be used.