98a26f9ae4
This commit improves soft deletion of system apps. Before if the package was missing, it failed to recover or delete system apps. Now, it works even though if `Get-AppxPackage` returns null (i.e. package is non-existing), so it can be executed even after a hard delete. This allows safely introducing hard-delete of system apps (as discussed in #260) with still keeping a robust soft-delete as complement. Before, the script was dependent on `Get-AppxPackage.InstallLocation`, however a system app can only be located in one of these folders: - C:\Windows\SystemApps\{PackageFamilyName} - C:\Windows\{ShortAppName} To ensure resilience, this commit adjust the script to rename the files within these directories if Get-AppxPackage fails, this provides a fallback.