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

Add a silent uninstaller #16892

Closed
Nael-Sayegh opened this issue Jul 22, 2024 · 17 comments
Closed

Add a silent uninstaller #16892

Nael-Sayegh opened this issue Jul 22, 2024 · 17 comments
Labels
close/worksforme p5 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Milestone

Comments

@Nael-Sayegh
Copy link
Contributor

Is your feature request related to a problem? Please describe.

NVDA offers a silent installer that can be used by specifying a configuration, which is very convenient for deployments on remote computers, such as with WAPT.
However, it does not provide a silent uninstaller, which poses a problem if you want to uninstall it remotely when the user doesn't need it, as WAPT would. .Or it is not documented

Describe the solution you'd like

It would be practical to have a silent uninstall key available or to provide an argument to the uninstall.exe file to specify that it should be silent and remove the user's configuration.

Describe alternatives you've considered

None

Additional context

@Nael-Sayegh
Copy link
Contributor Author

Does this function already exist @SaschaCowley ?

@SaschaCowley
Copy link
Member

@Nael-Sayegh Not as far as I know.

@wmhn1872265132
Copy link
Contributor

NVDA can be uninstalled silently through uninstall.exe /S, but please note:

  1. The configuration files in %appdata%\NVDA need to be deleted manually;
  2. Since the uninstaller runs under ordinary user rights by default, it needs to be executed in a command line with administrator rights to uninstall correctly.

@SaschaCowley
Copy link
Member

@wmhn1872265132 Is this documented anywhere?

@wmhn1872265132
Copy link
Contributor

This is a function provided by NSIS. NVDA has not found any documentation describing this function.

@SaschaCowley
Copy link
Member

Thanks, @wmhn1872265132.

@gerald-hartig
Copy link
Collaborator

This is a duplicate of #16150, however it could be better documented. @Qchristensen

@gerald-hartig gerald-hartig added p5 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation. labels Jul 24, 2024
@Qchristensen
Copy link
Member

Per @wmhn1872265132's Comment above, it sounds like this already works using the /S switch as an administrator, except for the %appdata%\NVDA folder. There are several issues which reference this:

#6869 notes how add-ons are left after uninstall.
#9596 requests an option to prompt whether to use or remove old configurations on install. I created that one out of the need that some users were uninstalling / reinstalling NVDA to fix an issue with a non-working configuration (they'd set the speed too fast, NVDA volume to silent, etc and thought reinstalling might fix it).

So, two or possibly three actions for this:

Can anyone confirm, are these (config & add-ons not being removed) the issues referred to about running uninstall with /S as a regular user rather than administrator, or are there more?

  1. If the routine needs to run as administrator, can we prompt for admin access when running it?

  2. Document in https://www.nvaccess.org/files/nvda/documentation/userGuide.html#CommandLineOptions the silent uninstall switch.

  3. Should we consider an uninstall option (and associated command-line switch) to force deletion of add-ons and configuration files. This may resolve Add option to installation routine to choose whether to keep previous configuration (where one is found) #9596, but in any case, is also likely the behaviour expected by corporate users.

@wmhn1872265132
Copy link
Contributor

It should be pointed out that NVDA's uninstaller does not support clearing user configuration files, so whether it is uninstalled through the command line or through the GUI, the configuration cannot be deleted.

@Nael-Sayegh
Copy link
Contributor Author

@Qchristensen I think the default user directory should either be removed upon uninstallation, as this is the behavior expected by many users, or, as proposed, an option should be added to choose to remove it, which should also be possible via CMD.
I believe that uninstallation via CMD should be indicated in the documentation, as it would make the work easier for IT services for the deployment of NVDA.
One thing I haven't tested yet: is it possible to install NVDA via CMD by specifying a configuration to load for the user?

@SaschaCowley
Copy link
Member

I think the default user directory should either be removed upon uninstallation, as this is the behavior expected by many users, or, as proposed, an option should be added to choose to remove it, which should also be possible via CMD.

I would vote for the latter. Many programs leave their user config present upon uninstallation to make things like repair installs easier. Nevertheless, a complete uninstall that removes all (reasonable) traces of NVDA should be an option.

I believe that uninstallation via CMD should be indicated in the documentation, as it would make the work easier for IT services for the deployment of NVDA.

Absolutely agreed. @coderabbitai please open an issue to document command line uninstallation of NVDA in the user guide.

One thing I haven't tested yet: is it possible to install NVDA via CMD by specifying a configuration to load for the user?

I don't know, but I doubt it. One thing that might work as a work around is to create a portable copy, configure as desired, then install from portable keeping the config. I think this is possible from the GUI, but I'm not sure about from the CLI.

Copy link
Contributor

coderabbitai bot commented Aug 5, 2024

Tip

For best results, initiate chat on the files or code changes.

@SaschaCowley, I've opened an issue to document the command line uninstallation of NVDA in the user guide. This will help IT services in deploying NVDA more efficiently. You can find the new issue here: Issue #16966.

Regarding the installation via CMD by specifying a configuration to load for the user, it might be possible to create a portable copy, configure it as desired, and then install from the portable copy while keeping the configuration. However, this needs to be verified for CLI usage.

Analysis chain

@SaschaCowley, I've opened an issue to document the command line uninstallation of NVDA in the user guide. This will help IT services in deploying NVDA more efficiently.

Regarding the installation via CMD by specifying a configuration to load for the user, it might be possible to create a portable copy, configure it as desired, and then install from the portable copy while keeping the configuration. However, this needs to be verified for CLI usage.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
gh issue create --title "Document command line uninstallation of NVDA in the user guide" --body "Per [@wmhn1872265132's Comment](https://github.com/nvaccess/nvda/issues/16892#issuecomment-2244047838), NVDA can be uninstalled silently through uninstall.exe /S. However, this process is not documented. 

The following actions are suggested:
1. Document the silent uninstall switch in https://www.nvaccess.org/files/nvda/documentation/userGuide.html#CommandLineOptions.
2. Consider adding an uninstall option (and associated command-line switch) to force deletion of add-ons and configuration files.

This documentation would greatly assist IT services in deploying NVDA more efficiently.

Referenced Issues:
- #6869: Add-ons left after uninstall.
- #9596: Option to prompt whether to use or remove old configurations on install.

For further context, see the discussion in [Issue #16892](https://github.com/nvaccess/nvda/issues/16892)." --assignee SaschaCowley

Length of output: 1010


Learnings added
Learnt from: SaschaCowley
URL: https://github.com/nvaccess/nvda/issues/16892

Timestamp: 2024-08-05T23:09:38.256Z
Learning: Document the command line uninstallation process for NVDA in the user guide.

Learnt from: SaschaCowley
URL: https://github.com/nvaccess/nvda/issues/16892

Timestamp: 2024-08-05T23:09:38.256Z
Learning: Document the command line uninstallation process for NVDA in the user guide.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

@Nael-Sayegh
Copy link
Contributor Author

@SaschaCowley It is true that many programs leave their configuration behind, and NVDA would do well to follow this way of functioning.
Adding an option to delete it seems like a good alternative.
I think your solution of installing a portable copy could work, thanks to the --copy-portable-config argument which seems to copy the portable configuration of NVDA to the new installation.
What do you think?

@SaschaCowley
Copy link
Member

Yes, I believe that's currently the only option to install with a custom config (short of making your own build that does what so).

@Nael-Sayegh
Copy link
Contributor Author

@SaschaCowley Yes, I think we can close this ticket since @coderabbitai has created another issue to document the uninstallation function.

Copy link
Contributor

coderabbitai bot commented Aug 11, 2024

Tip

For best results, initiate chat on the files or code changes.

@Nael-Sayegh, that sounds like a good plan. Closing this ticket makes sense now that the documentation issue has been created. If there's anything else you need, feel free to reach out!


Learnings used
Learnt from: SaschaCowley
PR: nvaccess/nvda#0
File: :0-0
Timestamp: 2024-08-05T23:09:38.422Z
Learning: Document the command line uninstallation process for NVDA in the user guide.

Learnt from: SaschaCowley
PR: nvaccess/nvda#0
File: :0-0
Timestamp: 2024-08-05T23:09:38.422Z
Learning: Document the command line uninstallation process for NVDA in the user guide.

@SaschaCowley
Copy link
Member

Closed as this is currently possible. Documentation recommended, see #16966 for progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
close/worksforme p5 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Projects
None yet
Development

No branches or pull requests

5 participants