Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
win: fix Win 11 Windows Security app removal #195
This commit fixes the issue of Windows Security app not being removed in Windows 11. It addresses the problem by extending the app uninstallation process to cover the new app package specific to Windows 11. It improves the overall design of templated functions for store app removal to implement the fix. - Improve Windows Security removal script: - Add support for removing `Microsoft.SecHealthUI` in Windows 11. - Revise script documentation for clarity and correct typos. - Redesign uninstallion of Store apps: - Change `UninstallSystemApp` to `UninstallNonRemovableStoreApp` for wider usage. This change is due to `Microsoft.SecHealthUI` being non-removable yet not a system app. - Refactor app data cleanup into two distinct functions (`ClearStoreAppDataBeforeUninstallation` and `ClearStoreAppDataAfterUninstallation`) for better clarity and maintainability. This also helps in testing by allowing easier reordering of operations. - Seperate between simple non-removable app uninstallation and uninstallation with cleanup in separate functions, highlighting that the latter is more invasive and should be used cautiously. This addresses permission issues encountered with `SecHealthUI` app removal during cleanup on Windows 11. - Separate uninstalling app and uninstalling app with cleanup to different functions, document that cleanup should no longer be prefered as it's invasive and too aggresive. Cleanup logic introduces permission issues/errors for `SecHealthUI` in Windows 11. - Extend app soft-deletion to include the default Windows app folder, this ensures that the cleanup covers any kind of Store apps (not only system apps).
- Loading branch information