On Server 2012, scheduled task does not exit 101, rather exits 2147942501 when reboot required
On many of our VM builds, this works fine, but on Server 2012 in particular this appears to get stuck, printing Waiting for the Windows Modules Installer to exit... to the console and logging Retryable error: Windows update script exited with non-zero exit status: 2147942501 to the log.
This PR adds the exit code in the 2 spots it's required, so that it can detect the reboot required state.
Hey @rgl - just a polite bump to hopefully get this onto your radar.
We've tested this across all our VM builds and we're happy it solves the problem well.
On Server 2012, scheduled task does not exit 101, rather exits 2147942501 when reboot required
On many of our VM builds, this works fine, but on Server 2012 in particular this appears to get stuck, printing Waiting for the Windows Modules Installer to exit... to the console and logging Retryable error: Windows update script exited with non-zero exit status: 2147942501 to the log.
This PR adds the exit code in the 2 spots it's required, so that it can detect the reboot required state.
Fixes https://github.com/rgl/packer-plugin-windows-update/issues/130