Added a feature to restart windows after an update. (#19718)
Closes #19268
After installing or updating NVDA, users sometimes experience issues that a Windows restart fixes. This PR adds a post-install dialog giving users clear options for what to do next.
Description of user facing changes
After a successful installation or update, NVDA shows a dialog recommending a Windows restart.
Restart Windows: Immediately restarts Windows.
Start NVDA: Starts the newly installed copy without restarting (not shown when running elevated).
Exit NVDA: Closes without starting NVDA or restarting Windows.
If the Windows restart command fails, an error dialog informs the user to restart manually.
Silent installs are unaffected.
Description of developer facing changes
source/gui/installerGui.py:
Added _restartWindows() — issues shutdown /r /t 0 via subprocess.run with CREATE_NO_WINDOW. Returns True if successful.
Added _showPostInstallDialog(isUpdate, startAfterInstall) — shows the post-install MessageDialog with up to 3 buttons (CUSTOM_1, CUSTOM_2, CANCEL) and handles all follow-up actions.
Modified doInstall() to call _showPostInstallDialog instead of the old gui.messageBox for non-silent installs.
user_docs/en/userGuide.md: Added #RestartWindowsAfterInstall section; updated installation description.
user_docs/en/changes.md: Added new-feature entry under 2026.2.