-
-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
win: fix store revert for multiple installs #260
This commit improves the revert script for store apps to handle scenarios where `Get-AppxPackage` returns multiple packages. Instead of relying on a single package result, the script now iterates over all found packages and attempts installation using the `AppxManifest.xml` for each. This ensures that even if multiple versions or instances of a package are found, the script will robustly handle and attempt to install each one until successful. Other changes: - Add better message with suggestion if the revert code fails, as discussed in #270. - Improve robustness of finding manifest path by using `Join-Path` instead of basic string concatenation. This resolves wrong paths being built due to missing `\` in file path. - Add check for null or empty `InstallLocation` before accessing manifest path. It prevents errors when accessing `AppxManifest.xml`, enhancing script robustness and reliability. - Improve error handling in manifest file existence check with try-catch block to catch and log exceptions, ensuring uninterrupted script execution in edge cases such as when the script lacks access to read the directory. - Add verification of package installation before attempting to install the package for increased robustness. - Add documentation for revertCode.
- Loading branch information
1 parent
0466b86
commit 5bb13e3
Showing
1 changed file
with
47 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters