microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
22.88k stars 1.42k forks source link

Zap feature #266

Open amryadam opened 4 years ago

amryadam commented 4 years ago

Description of the new feature/enhancement

Complete uninstallation of files associated with applications

https://github.com/Homebrew/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/zap.md

Proposed technical implementation details (optional)

megamorf commented 4 years ago

This is only possible with msix installers. Not all resources of old exe/msi based installers are being tracked which makes a complete removal impossible.

denelon commented 4 years ago

There may be additional keys that could be added to a manifest to help with this in some cases.

sredna commented 4 years ago

This is hard for applications that are installed for all users (in Program Files etc.) with "classic installers" because there is no documented way to access the special folders in another users profile without having a token handle for that user (and that users profile already loaded in the registry). You cannot get a token for a user that is not logged in without knowing their password.

The Microsoft guidelines for classic installers basically say that you should just ignore files left behind in %AppData%, %LocalAppData% and HKEY_CURRENT_USER when uninstalling for all users on a machine.

megamorf commented 4 years ago

System-wide installations by classic installers can litter the system with component registrations, certificates, untracked files, scheduled tasks, etc. not even taking into account application settings stored in user profiles. The uninstallation of such applications should not touch user profiles except if the uninstaller has an option that allows for the removal of settings in the current user's profile (which is not that common).

Trenly commented 1 year ago

[Policy] Command-Uninstall