在Windows 10中替换IAutomaticUpdates :: pause?

时间:2015-08-25 23:21:06

标签: winapi

在早期版本的Windows中,此暂停的自动更新:

    IAutomaticUpdates *automaticUpdates = 0;
    HRESULT hr = CoCreateInstance(CLSID_AutomaticUpdates, NULL, CLSCTX_ALL, IID_IAutomaticUpdates, (void**)&automaticUpdates);
    if (automaticUpdates != NULL)
    {
        hr = automaticUpdates->Pause();
    }

根据MSDN,"不再支持IAutomaticUpdates :: Pause。从Windows 10 Insider Preview调用Pause始终返回S_OK,但什么都不做。" IAutomaticUpdates::Pause

我们不希望Windows Update中断我们的程序。有没有人知道一种解决方法?

0 个答案:

没有答案