WUAPI: Feature Updates

1

I'm trying to install a feature update using WUAPI. I believe I need IUpdateInstaller4::Commit method but I cannot make it work. Without the commit method the feature update stays in the processing state after the installation. I already tried few things:

  • updateSession.CreateUpdateInstaller() returns IUpdateInstaller not IUpdateInstaller4. Anyway I tried:
var updateInstaller4= (IUpdateInstaller4) updateSession.CreateUpdateInstaller();

// installation logic

updateInstaller4.Commit(1);

It got stuck for some time at the commit method and finished successfully but the update was not installed

  • I also tried:
var updateInstaller4 = (IUpdateInstaller4) new WUApiLib.UpdateInstallerClass();
updateInstaller4.Commit(1);

But I get : 'Exception from HRESULT: 0x80240004'

Is it even a good approch to install the feature updates? Thank you for any help.

c#
windows
com
wuapi
asked on Stack Overflow May 21, 2020 by Wojciech Waniek

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0