- Run "gpedit.msc"
- Expand "Local Computer Policy"
- Computer Configuration
- Administrative Templates
- Windows Components
- Windows Update
- Enable the option “No auto-restart with logged on users for schedule automatic updates installations“.
This won't prevent the popup above from nagging you, but at least it wont automatically restart and destroy any unsaved work.
Just another safety reminder kids, do not to take any candy from strangers.