0
// Create installer from list
IUpdateInstaller installer = session.CreateUpdateInstaller();
installer.Updates = updatesToInstall;

// Install updates
IInstallationResult installationRes = installer.Install();

I can make optional updates using this. But important updates are "failing". Could you help?

  • Please elaborate on *but important updates are "failing"*. – Am_I_Helpful Jul 29 '18 at 03:54
  • in return `installationRes.ResultCode = orcFailed` – zekeriyafince Jul 29 '18 at 12:47
  • You should try to read the HRESULT value from the `installationRes` reference, which would further give you the idea what went wrong! – Am_I_Helpful Jul 29 '18 at 16:47
  • I could not understand, would you open a little more – zekeriyafince Jul 30 '18 at 06:26
  • I meant along with reading `installationRes.ResultCode` you should also read `installationRes.HResult` value which **Gets the HRESULT of the exception, if any, that is raised during the installation**. Once you know the error code, you'd get to know what resulted to the failure of patch installation. – Am_I_Helpful Jul 30 '18 at 06:36
  • I understand, I will try – zekeriyafince Jul 30 '18 at 08:28
  • When I do Microsoft Word update, `installationRes.HResult` value is "-2145124318". Not updating – zekeriyafince Jul 30 '18 at 13:49
  • The error "-2145124318" means `Operation failed for all the updates.Source: Windows Update Agent`. Would you be able to check the Windows Update log file of the system where you're trying to install the update? It might have a better description of what actually is happening. – Am_I_Helpful Jul 30 '18 at 14:34
  • I examined; "Installation Error: Windows could not install the update with the **0x80070663 error**: Security Update for Microsoft Word 2016 (KB4022218) 64-Bit Version." – zekeriyafince Jul 30 '18 at 14:56
  • Check this link: https://social.technet.microsoft.com/Forums/office/en-US/e3e5321c-265a-42a0-a218-d666c8c7e7f3/office-updates-fail-with-error-0x80070663?forum=Office2016ITPro, and check if non-office updates are installing successfully or not. – Am_I_Helpful Jul 30 '18 at 17:38
  • Thank you for your last responsibility. My pc is Windows 7. Does it work on other Windows 10 and 8? – zekeriyafince Jul 31 '18 at 10:59
  • Sorry, I won't be able to suggest that! But, as I said, please try downloading and installing other types/categories of updates for other products(OS / IE / .NET, etc.) – Am_I_Helpful Jul 31 '18 at 11:25
  • 1
    thanks for your help – zekeriyafince Jul 31 '18 at 12:24

0 Answers0