wuapi

Correct way to stop asynchronous ISearchJob

吃可爱长大的小学妹 提交于 2021-02-10 06:33:12
问题 I am going to use WUA API and begin execution of an asynchronous search for updates in this way: CComPtr<SearchCallbackImpl> iscc_; <<-- Note you need to CreateInstance CComPtr<ISearchJob> pUpJob_; pUpJob_ = NULL; pUpSearcher_->BeginSearch( CComVariant(criteria.c_str()).bstrVal, iscc_, CComVariant(L"Scanning"), &pUpJob_); When I need to stop my program, but ISearchJob has not completed yet, I use this code: if (pUpJob_) { CComVariant isStopped; pUpJob_->get_IsCompleted(&isStopped.boolVal); if

Determine Windows Update classification

血红的双手。 提交于 2019-12-31 03:55:27
问题 From the Windows Update COM Library (WUAPILib) I have access to the IUpdate interface however I don't see of any way to use to get the update classification (Critical, Important, Optional) to group updates in the same way like the Windows Update UI in Control Panel does. 回答1: With the help of the IUpdate, you can get the IcategoryCollection from the Update ID. Now, the first ICategory stores the classification of update type for the OS. Do pay special attention to the line where comment is

WUApiLib IUpdateInstaller2 yields Error; Some OS updates install others throw HResult -2145124318

為{幸葍}努か 提交于 2019-12-09 17:29:56
问题 Updates are being downloaded from a local server and not from WUS or Microsoft Repositories. Local server is Linux based which host's the contents for each update. I'm not using UpdateDownloader to download from Microsoft Servers, i manually download the update content and then use CopyToCache . These installed fine Security Update for Microsoft .NET Framework 3.5 SP1 on Windows XP, Server 2003, Vista, Server 2008 x86 (KB2736416) Security Update for Microsoft Visual Studio 2010 (KB2542054)

WUApiLib IUpdateInstaller2 yields Error; Some OS updates install others throw HResult -2145124318

帅比萌擦擦* 提交于 2019-12-04 04:06:21
Updates are being downloaded from a local server and not from WUS or Microsoft Repositories. Local server is Linux based which host's the contents for each update. I'm not using UpdateDownloader to download from Microsoft Servers, i manually download the update content and then use CopyToCache . These installed fine Security Update for Microsoft .NET Framework 3.5 SP1 on Windows XP, Server 2003, Vista, Server 2008 x86 (KB2736416) Security Update for Microsoft Visual Studio 2010 (KB2542054) These Didn't Security Update for Microsoft .NET Framework 4 on XP, Server 2003, Vista, Windows 7, Server

Why isn't IUpdateSession::WebProxy working on Windows 10?

六眼飞鱼酱① 提交于 2019-12-01 06:02:00
问题 I've got some in-house code that performs a Microsoft Update scan using the Windows Update API. Because some of the clients do not have direct internet access, I explicitly set the WebProxy property to point to our local proxy server. During testing (on Windows 7) this seemed to work perfectly. Now I'm testing it on Windows 10 (see footnote 1) and it seems that the proxy setting is being ignored. The Windows Update client was revised significantly in Windows 10, so it is possible that this is