nvda icon indicating copy to clipboard operation
nvda copied to clipboard

Installer: try multiple times to remove the NVDA exes, giving the installed NVDA extra time to fully exit on the UAC screen

Open michaelDCurran opened this issue 1 year ago • 0 comments

Link to issue number:

Fixes #16199

Summary of the issue:

In pr #16174, effort was made to make the installer more robust, including better handling when the installed NVDA is still running, by trying to remove the NVDA exes first, and if any of them fail, restoring them all and not corrupting a user's install. Although it no longer corrupts the install, it was too fast at at trying to remove the exes and no longer tried multiple times, which did not take into account that the installed NVDA has just been running on the UAC screen, and may still be exiting.

Description of user facing changes

NVDA will try multiple times itself to remove the NVDA exes while waiting for the installed NvDA to fully exit.

Description of development approach

  • When the installer starts, it will now first wait an initial 1 second to give time for the installed NVDA to exit from the UAC screen.
  • When trying to remove each of the NvDA exes, the installer will again try up to 6 times, waiting half a second before the next try. Again, giving much more chance for an installed NvDA to fully exit like it used to.
  • NVDA will always clean up the temporary files it created while trying to remove all of the exes, whether or not it resulted in a retryableFailure.

Testing strategy:

  • [x] Installed NVDA on Windows 11 with no other logged on user. Confirm that after one or more tries, NvDA successfully installs.
  • [x] Installed NVDA on Windows 11 with another logged on user currently running NVDA. Confirm that the installer should fail asking to retry for ever. If cancelled, the install should not be corrupt.
  • [x] Again Install NVDA on Windows 11 with another logged on user currently running NVDA. Confirm that the installer should fail asking to retry until the other user quits NVDA / logs out.

Known issues with pull request:

None known.

Code Review Checklist:

  • [x] Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • [x] Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • [x] UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • [x] API is compatible with existing add-ons.
  • [x] Security precautions taken.

michaelDCurran avatar Feb 21 '24 02:02 michaelDCurran