2015-11-22, 11:02
Since upgrading my various Kodi HTPCs from Windows 8.1 to Windows 10 I've noticed that OS updates coming down through Automatic Updates are not installing in my day-to-day usage.
I'm still using Kodi 14.2 due to being a little gun shy after all the issues through 15.0, 15.1, until we got 15.2 which seems (from most reports) to have finally ironed out the major kinks. I will update sometime (or maybe just wait for 16.x with the DX11 support) but have put it off as I have 3 devices to update that use a shared MySQL database and if I have to troubleshoot or rollback, don't need grief from the family as they are 'down' through this process
Anyway..
I treat my HTPCs like Kodi 'appliances';
1. Power On
2. They autologin a local user account
3. They launch Kodi (just called from Startup folder link)
4. I watch content
5. When finished, I select "Power off System" from Kodi's power button menu
Under Windows 7 and 8.1, updates downloaded in the background would install (as best as I can recall) and be applied through the above routines.
Under Windows 10. I'm finding security updates stay 'queued' in a pending update state until I exit Kodi, and then either
Is there a different method/API call that needs to be used with Windows 10 so that if there are pending updates ready to install, that when Kodi is exited via "Power off System" the updates are applied then Windows shut down?
I haven't looked at the Kodi source code to check and I'm not a developer so please excuse what may be dumb suggestions, but if "Power off System" is simply calling ExitWindowsEx() API function, then changing this to InitiateShutdown and including the SHUTDOWN_INSTALL_UPDATES flag would possibly resolve this issue. InitiateShutdown is supported on Vista and higher whereas ExitWindowsEx was from XP era and doesn't support any flags to apply pending updates.
I also appreciate the inconsistency of my assumption that pending updates were installing under Win7/8 as ExitWindowsEx wouldn't've allowed this...
I'm still using Kodi 14.2 due to being a little gun shy after all the issues through 15.0, 15.1, until we got 15.2 which seems (from most reports) to have finally ironed out the major kinks. I will update sometime (or maybe just wait for 16.x with the DX11 support) but have put it off as I have 3 devices to update that use a shared MySQL database and if I have to troubleshoot or rollback, don't need grief from the family as they are 'down' through this process
Anyway..
I treat my HTPCs like Kodi 'appliances';
1. Power On
2. They autologin a local user account
3. They launch Kodi (just called from Startup folder link)
4. I watch content
5. When finished, I select "Power off System" from Kodi's power button menu
Under Windows 7 and 8.1, updates downloaded in the background would install (as best as I can recall) and be applied through the above routines.
Under Windows 10. I'm finding security updates stay 'queued' in a pending update state until I exit Kodi, and then either
- From the Windows 10 Start Menu -> Menu -> select Update and Shut Down
- From Windows 10 -> Settings -> Update & Security -> Windows Update -> see the pending update and click Restart
Is there a different method/API call that needs to be used with Windows 10 so that if there are pending updates ready to install, that when Kodi is exited via "Power off System" the updates are applied then Windows shut down?
I haven't looked at the Kodi source code to check and I'm not a developer so please excuse what may be dumb suggestions, but if "Power off System" is simply calling ExitWindowsEx() API function, then changing this to InitiateShutdown and including the SHUTDOWN_INSTALL_UPDATES flag would possibly resolve this issue. InitiateShutdown is supported on Vista and higher whereas ExitWindowsEx was from XP era and doesn't support any flags to apply pending updates.
I also appreciate the inconsistency of my assumption that pending updates were installing under Win7/8 as ExitWindowsEx wouldn't've allowed this...