Windows Update Agent API 检查系统补丁安装情况的函数
来源:互联网 发布:美国大学录取数据 编辑:程序博客网 时间:2024/05/22 11:16
IUpdateSearcher interface
We are using the WUA to detect missing windows updates. The
problem is that not all categories are returned. Comparing the result
from the WUA with the result from the update.microsoft.com is different.
For example the update.microsoft.com site shows a category called
"Microsoft Office 2003" which is not returned by the WUA.
Here is the code we are using:
Are there any informations about that ?
problem is that not all categories are returned. Comparing the result
from the WUA with the result from the update.microsoft.com is different.
For example the update.microsoft.com site shows a category called
"Microsoft Office 2003" which is not returned by the WUA.
Here is the code we are using:
CoInitialize(NULL);IUpdateSession* pUpdateSession = NULL;IUpdateServiceManager* pUpdateServiceManager = NULL;IUpdateService* pUpdateService = NULL;IUpdateSearcher* pUpdateSearcher = NULL;m_errorScan = failure;do{// create update session object.Log(llTrace, (CPString)L"Windows Update Scan : Create update session object");HRESULT hr = CoCreateInstance ( CLSID_UpdateSession, NULL, CLSCTX_INPROC_SERVER, IID_IUpdateSession, (void**) &pUpdateSession );if ( FAILED(hr) || pUpdateSession == NULL ){break;}// create update service manager object.Log(llTrace, (CPString)L"Windows Update Scan : Create update service manager object");hr = CoCreateInstance ( CLSID_UpdateServiceManager, NULL, CLSCTX_INPROC_SERVER, IID_IUpdateServiceManager, (void**) &pUpdateServiceManager );if ( FAILED(hr) || pUpdateServiceManager == NULL ){break;}// create update searcher object.Log(llTrace, (CPString)L"Windows Update Scan : Create update searcher object");hr = pUpdateSession->CreateUpdateSearcher(&pUpdateSearcher);if ( FAILED(hr) || pUpdateSearcher == NULL ){break;}// select the update server source.Log(llTrace, (CPString)L"Windows Update Scan : Select the update server source");hr = pUpdateSearcher->put_ServerSelection(ssWindowsUpdate);hr = pUpdateSearcher->put_CanAutomaticallyUpgradeService(VARIANT_TRUE);hr = pUpdateSearcher->put_IncludePotentiallySupersededUpdates(VARIANT_TRUE);hr = pUpdateSearcher->put_Online(VARIANT_TRUE);ISearchResult* pSearchResult = NULL;Log(llTrace, (CPString)L"Windows Update Scan : Start search");hr = pUpdateSearcher->Search(BSTR(L"IsInstalled = 0"), &pSearchResult);if ( FAILED(hr) || pSearchResult == NULL ){break;}// retrive and write the category collection content.ICategoryCollection* pCategoryCollection = NULL;hr = pSearchResult->get_RootCategories(&pCategoryCollection);if ( FAILED(hr) || pCategoryCollection == NULL ){break;}else{WriteCategoryCollection(pCategoryCollection, m_aWindowsUpdateCategories);}LONG count = 0;HRESULT hr = pCategoryCollection->get_Count(&count);if(FAILED(hr)){return eCreationErr;}for(int i = 0; i < count; i++){ICategory* pCategory = NULL;hr = pCategoryCollection->get_Item(i, &pCategory);if(FAILED(hr)){continue;}...
Are there any informations about that ?
- Windows Update Agent API 检查系统补丁安装情况的函数
- 用Windows命令行如何检查Windows系统补丁(KBxxxxxx)的最后一次安装时间?
- 批量安装Windows系统补丁的脚本
- Windows Update Downloader:系统补丁离线打
- [WUA APIs]Using the Windows Update Agent API
- Windows Update Agent 5.8
- Windows 安装补丁报错 0xc8000247 Windows update 当前无法检查更新,因为未运行服务。您可能需要重新启动计算机。
- 手动更新系统补丁时,windows update一直卡住解决方法
- windows系统cab补丁安装方法
- 远程检测客户机上的系统补丁安装情况与端口开放状态
- 补丁版本的检查和安装过程中常见问题
- 安装VS2005的sp1补丁错误,未通过数字签名检查
- 如何利用程序获得当前系统的补丁情况
- 判断Windows系统补丁
- windows卸载系统补丁
- windows系统补丁集成
- Windows安装 Zabbix agent
- Windows Update Agent 5.8.02469下载
- throw和throw ex的区别
- SQL索引优缺点
- 爱是永久相思情
- ST 2类系统_ ST中创建和使用类
- C++内存管理
- Windows Update Agent API 检查系统补丁安装情况的函数
- 窗口全屏代码
- jsp页面自动跳转的实现
- WEB简单通用的选项卡效果
- mysql_pconnect的水挺深,apache下的数据库长连接
- Android 2.3 Gallery3D添加gif支持——概要(一)
- ajax+thinkphp框架实现无刷新分页
- usaco 5.3 Milk Measuring(背包)
- SD卡 问题总结