When updates are available and the user selects Shut Down from the Windows start menu, a dialog appears with a menu for Shutdown, Log Off etc.
One option which appears is
"Install Updates And Shut Down"
The question is, what exactly happens when the user presses OK?
Is the task showing the dialog Explorer? (It seems impossible to tell with process monitor spying, because the desktop is frozen)
I assume (But am not sure) this is Explorer and when the user presses OK it calls ExitWindowsEx
If So the question is what is different when the user selects "Install Updates And Shut Down" would it send special flags to ExitWindowsEx or perhaps call another API and would there be any way to spy this functionality?