Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run the uninstaller with administrator privileges #16505

Merged

Conversation

wmhn1872265132
Copy link
Contributor

@wmhn1872265132 wmhn1872265132 commented May 8, 2024

Link to issue number:

none

Summary of the issue:

NVDA cannot be uninstalled correctly by directly running "%ProgramFiles(x86)%\NVDA\uninstall.exe". You must run it as an administrator to uninstall it correctly.

Description of user facing changes

You can directly run "%ProgramFiles(x86)%\NVDA\uninstall.exe" to uninstall NVDA

Description of development approach

Change RequestExecutionLevel to admin

Testing strategy:

Manually run "%ProgramFiles(x86)%\NVDA\uninstall.exe", the uninstaller should correctly apply for administrator rights and uninstall NVDA

Known issues with pull request:

The portable version of NVDA's uninstall.exe will also apply for administrator rights when running.

Code Review Checklist:

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

@wmhn1872265132 wmhn1872265132 marked this pull request as ready for review May 8, 2024 09:40
@wmhn1872265132 wmhn1872265132 requested a review from a team as a code owner May 8, 2024 09:40
@wmhn1872265132 wmhn1872265132 requested a review from seanbudd May 8, 2024 09:40
@wmhn1872265132 wmhn1872265132 changed the title Change RequestExecutionLevel Run the uninstaller with administrator privileges May 8, 2024
@seanbudd
Copy link
Member

seanbudd commented May 9, 2024

The portable version of NVDA's uninstall.exe will also apply for administrator rights when running.

I think that's okay. I assume that tool is used to uninstall NVDA from a computer, not delete the portable copy. A portable copy cannot be installed or uninstalled

@seanbudd seanbudd merged commit ed5ede9 into nvaccess:master May 9, 2024
1 check passed
@nvaccessAuto nvaccessAuto added this to the 2024.3 milestone May 9, 2024
@wmhn1872265132 wmhn1872265132 deleted the ChangeRequestExecutionLevel branch May 9, 2024 01:30
XLTechie pushed a commit to XLTechie/xlnvda that referenced this pull request May 10, 2024
NVDA cannot be uninstalled correctly by directly running "%ProgramFiles(x86)%\NVDA\uninstall.exe". You must run it as an administrator to uninstall it correctly.

Description of user facing changes
You can directly run "%ProgramFiles(x86)%\NVDA\uninstall.exe" to uninstall NVDA

Description of development approach
Change RequestExecutionLevel to admin
seanbudd added a commit that referenced this pull request May 22, 2024
@seanbudd
Copy link
Member

I'm reverting this PR as it makes admin permissions required to generate the uninstaller. I don't believe this is setup correctly.
The installer doesn't require this and uses RequestExecutionLevel user.

Please file an issue first describing the problem you are facing, as generally the uninstaller works for me and requests admin level.

seanbudd added a commit that referenced this pull request May 22, 2024
This reverts commit ed5ede9.

Reverts #16505

Issues fixed
None

Issues reopened
None

Reason for revert
The approach in #16505 appears incorrect.
Admin level is requested when generating the uninstaller, not when running it.
It is also dubious if the original issue is valid.

Can this PR be reimplemented? If so, what is required for the next attempt
An issue should be filed first and investigated
@michaelDCurran
Copy link
Member

It seems that When running the uninstaller from control panel / programs and features, or Windows Settings -> Apps -> installed apps: Windows automatically elevates the uninstaller. I.e. I get a UAC screen each time.
However, when running uninstall.exe directly from c:\program files (x86)\nvda, for instance using File Explorer, the uninstaller ls launched with no UAC elevation.
I would not think it is a very likely / supported pattern to run it directly. Generally people should use the installed apps / programs and features UI.

@seanbudd
Copy link
Member

I agree, I think the typical pattern here for consumers is to run commands from an administrator terminal when its needed.

@wmhn1872265132
Copy link
Contributor Author

But the uninstall icon in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\NVDA cannot be used. I think either keep this PR or fix this problem through other solutions, or delete the uninstall icon here.

@michaelDCurran
Copy link
Member

michaelDCurran commented May 22, 2024 via email

@wmhn1872265132
Copy link
Contributor Author

wmhn1872265132 commented May 22, 2024

Also, I really don’t think running the uninstall program directly should be unsupported, unless the program is invisible to the user, otherwise there should be no reason to prevent the user from doing this.

@seanbudd
Copy link
Member

Please open a new issue for the shortcut bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants