Skip to content

Added a feature to restart windows after an update.#19718

Merged
seanbudd merged 18 commits intonvaccess:masterfrom
kefaslungu:restartwindows
Mar 11, 2026
Merged

Added a feature to restart windows after an update.#19718
seanbudd merged 18 commits intonvaccess:masterfrom
kefaslungu:restartwindows

Conversation

@kefaslungu
Copy link
Copy Markdown
Contributor

@kefaslungu kefaslungu commented Feb 27, 2026

Summary of the issue/pull request

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.

Testing strategy

  • Install or update NVDA and verify:
    • Dialog appears with correct buttons.
    • "Restart Windows" restarts the system.
    • "Start NVDA" starts the installed copy.
    • "Exit NVDA" closes without starting NVDA.
    • When running elevated, "Start NVDA" is not shown.
    • Silent install (--install-silent) shows no dialog.
    • If restart fails, an error message is shown.

Known issues with pull request

None

kefaslungu and others added 6 commits February 27, 2026 03:09
Signed-off-by: kefaslungu <jameskefaslungu@gmail.com>
Signed-off-by: kefaslungu <jameskefaslungu@gmail.com>
Signed-off-by: kefaslungu <jameskefaslungu@gmail.com>
@seanbudd
Copy link
Copy Markdown
Member

seanbudd commented Feb 27, 2026

I'm not sure how I feel about this approach.

Instead of creating a new dialog, I think we should expand the dialog shown after the install completes.

Currently it says "Please press OK to start the installed copy.". Otherwise the installer continues to run

Instead I think we should have the following options:

  • Exit the current NVDA copy/installer
  • Continue running the current copy/installer
  • Start the freshly installed copy
  • Restart Windows

Thoughts?

@kefaslungu
Copy link
Copy Markdown
Contributor Author

Hi @seanbudd,

Exit the NVDA installer
Continue running the installer

How would this turn out if we are updating NVDA?

Secondly, do I remove the "don't ask me" option from the dialog and just let it be in the general setting?

@seanbudd
Copy link
Copy Markdown
Member

@kefaslungu - the dialog i am talking about happens after the NVDA installation completes. The current options are:

  • Continue running the installer
  • Start the freshly installed copy

You can add the quit option by calling the same code the exit dialog does.

I don't think a "don't ask me again" option is needed if we do it this way, or any settings at all

@kefaslungu
Copy link
Copy Markdown
Contributor Author

That is understood.

After an update, we don't usually get an option to continue running the installer, it's just starts the new installed copy.

What should I do there?

@kefaslungu
Copy link
Copy Markdown
Contributor Author

Hi @seanbudd

Since it's the same launcher in both cases, i'll just do as you say.

Let me get to it.

@seanbudd
Copy link
Copy Markdown
Member

My mistake, the option to continue running is not there. Let's adjust that dialog to add those options though

@XLTechie
Copy link
Copy Markdown
Collaborator

XLTechie commented Feb 27, 2026 via email

@seanbudd
Copy link
Copy Markdown
Member

@XLTechie - I think the case would be: you want to install NVDA, but don't intend to use it for long. You run the installer, test out NVDA briefly, decide to install, and want to continue testing without having to restart Windows or NVDA. This might not be possible or safe though, with our current installer pattern. We might just have to offer quit/start new copy/restart Windows

@kefaslungu
Copy link
Copy Markdown
Contributor Author

Hi @seanbudd,

I've made the changes, I've removed the option to continue running as well.

@jcoffin1
Copy link
Copy Markdown

jcoffin1 commented Feb 27, 2026 via email

@codeofdusk
Copy link
Copy Markdown
Contributor

I'd prefer that the restart dialog be suppressed for updates from one build of the same numeric version to another (i.e. master snapshots, PR builds, self-signed builds).

@kefaslungu
Copy link
Copy Markdown
Contributor Author

Hi @codeofdusk,

I'd prefer that the restart dialog be suppressed for updates from one build of the same numeric version to another (i.e. master snapshots, PR builds, self-signed builds).

I think an install is an install, the main reason for this is for proper cleanup, not really a version thing. We could sometimes be working on a new feature, and we want to build and test from the same version.

You still have an option not to restart anyway.

@kefaslungu
Copy link
Copy Markdown
Contributor Author

Expanding the existing completion dialog is definitely a cleaner, more integrated approach than introducing a second dialog, and your proposed options cover the full set of actions a user might reasonably want to take at that point. The four‑option layout you suggested makes sense: • Exit the NVDA installer • Continue running the installer • Start the freshly installed copy • Restart Windows This would keep everything in one place and avoid interrupting the flow with an additional modal. It also gives users clearer control over what happens next, especially in cases where NVDA needs to restart or where Windows needs a reboot to release file locks. I’m open to moving in this direction. My only concern is making sure the dialog doesn’t become overwhelming or confusing, but with good labeling and grouping it should stay intuitive. From: Sean Budd @.> Sent: Thursday, February 26, 2026 7:40 PM To: nvaccess/nvda @.> Cc: Subscribed @.> Subject: Re: [nvaccess/nvda] Added a feature to restart windows after an update. (PR #19718) seanbudd left a comment (nvaccess/nvda#19718) <#19718 (comment)> I'm not sure how I feel about this approach. Instead of creating a new dialog, I think we should expand the dialog shown after the install completes. Currently it says "Please press OK to start the installed copy.". Otherwise the installer continues to run Instead I think we should have the following options: * Exit the NVDA installer * Continue running the installer * Start the freshly installed copy * Restart Windows Thoughts? — Reply to this email directly, view it on GitHub <#19718 (comment)> , or unsubscribe https://github.com/notifications/unsubscribe-auth/AGDN7QCUIR3F6QF2T4OX4IT4N6U77AVCNFSM6AAAAACWBHUIGWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTSNZQGM4TANJUHE . You are receiving this because you are subscribed to this thread.Message ID: @.>

Hi, I've removed the option to Continue running the installer, I don't think this is necessary.

Comment thread source/gui/installerGui.py Outdated
@seanbudd
Copy link
Copy Markdown
Member

seanbudd commented Mar 2, 2026

is this ready for review?

Signed-off-by: kefaslungu <jameskefaslungu@gmail.com>
@kefaslungu kefaslungu marked this pull request as ready for review March 2, 2026 13:57
@kefaslungu kefaslungu requested review from a team as code owners March 2, 2026 13:57
@kefaslungu
Copy link
Copy Markdown
Contributor Author

Hi @seanbudd,

Yes. This is ready for review.

Copilot AI review requested due to automatic review settings March 5, 2026 02:08
@seanbudd seanbudd marked this pull request as draft March 5, 2026 02:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a post-installation dialog to NVDA that presents users with options to restart Windows, start the newly installed NVDA, or exit the installer after a successful installation or update. This addresses issue #19268, which reported that issues can occur when NVDA is installed or updated without restarting Windows (e.g., improper registration or application injection preventing virtual buffers in web browsers).

Changes:

  • Added _restartWindows() and _showPostInstallDialog() functions to installerGui.py, replacing the old simple success message box with a three-button dialog offering "Restart Windows", "Start NVDA" (conditional), and "Exit NVDA" options.
  • Updated user documentation (userGuide.md and changes.md) to describe the new post-install dialog and its options.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
source/gui/installerGui.py Added _restartWindows() to issue a Windows restart command and _showPostInstallDialog() to present post-install options; replaced the old gui.messageBox success dialog with the new MessageDialog-based dialog
user_docs/en/userGuide.md Added "Restart Windows After Installation" section documenting the new dialog and its options; updated the installation description to reference the new section
user_docs/en/changes.md Added changelog entry for the new post-install dialog feature

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/gui/installerGui.py Outdated
Comment thread user_docs/en/userGuide.md
Comment thread source/gui/installerGui.py Outdated
Comment thread source/gui/installerGui.py
Comment thread source/gui/installerGui.py Outdated
Signed-off-by: kefaslungu <jameskefaslungu@gmail.com>
… docs

Signed-off-by: kefaslungu <jameskefaslungu@gmail.com>
@kefaslungu kefaslungu marked this pull request as ready for review March 5, 2026 14:31
@SaschaCowley SaschaCowley added the conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review. label Mar 6, 2026
@seanbudd
Copy link
Copy Markdown
Member

seanbudd commented Mar 6, 2026

As requested previously, please address the unresolved comments: #19718 (comment)

@seanbudd seanbudd marked this pull request as draft March 6, 2026 03:45
…start success, update restart message wording

Signed-off-by: kefaslungu <jameskefaslungu@gmail.com>
@kefaslungu kefaslungu marked this pull request as ready for review March 9, 2026 12:19
Comment thread source/gui/installerGui.py Outdated
Comment thread source/gui/installerGui.py Outdated
Comment thread source/gui/installerGui.py Outdated
@seanbudd
Copy link
Copy Markdown
Member

Please make sure pre-commit is passing

@seanbudd seanbudd marked this pull request as draft March 10, 2026 01:25
Signed-off-by: kefaslungu <jameskefaslungu@gmail.com>
Signed-off-by: kefaslungu <jameskefaslungu@gmail.com>
@kefaslungu kefaslungu marked this pull request as ready for review March 10, 2026 04:00
Comment thread source/gui/installerGui.py
Comment thread source/gui/installerGui.py Outdated
…, NVDA now safely exits via triggerNVDAExit(None), case _ as returnCode: now logs an error with the unexpected return code instead of silently passing.

Signed-off-by: kefaslungu <jameskefaslungu@gmail.com>
Copy link
Copy Markdown
Member

@seanbudd seanbudd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kefaslungu

@seanbudd seanbudd enabled auto-merge (squash) March 10, 2026 22:11
@seanbudd
Copy link
Copy Markdown
Member

Please make sure to fix up translator comments:

Message has no translator comment.
Source lines: gui\installerGui.py:74
Message: Successfully updated your installation of NVDA. It is recommended to restart "Windows after updating. NVDA may malfunction without a restart."

Message has no translator comment.
Source lines: gui\installerGui.py:82
Message: Successfully installed NVDA. It is recommended to restart Windows after "installing. NVDA may malfunction without a restart."

Signed-off-by: kefaslungu <jameskefaslungu@gmail.com>
auto-merge was automatically disabled March 11, 2026 00:06

Head branch was pushed to by a user without write access

@seanbudd seanbudd enabled auto-merge (squash) March 11, 2026 00:19
@seanbudd seanbudd merged commit 4199958 into nvaccess:master Mar 11, 2026
55 of 57 checks passed
@github-actions github-actions Bot added this to the 2026.2 milestone Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prompt user to restart Windows after install

9 participants