Original KB number: 5011324
Summary
This article provides troubleshooting guidance for problems that arise from multiple versions of modern apps or application packages on Windows computers, particularly when system scans report these apps as vulnerable. The guidance helps you ensure that all instances of an app are updated, which enhances system security and resolves vulnerability reports. Symptoms include multiple app folders and versions due to user profiles and app updates.
Methods to resolve problems:
- Update the app for all users: Use PowerShell to identify and reconnect user profiles with outdated app versions.
- Remove old packages: Use PowerShell commands to identify and remove outdated Appx packages.
- Delete user profiles: Remove profiles associated with old app versions to clean up the system.
- Instructions for verifying updates and checking the WindowsApps folder are included.
Note: Removing an Appx package deletes its registration, but files might remain on disk because cleanup is asynchronous and best-effort. These leftover files are inert and low risk.
Symptoms
In recent Windows versions, several parts of the shell are moved to modern apps. You introduce those apps as .msix or .appx files. You need to register them per user each time a user signs in to Windows for the first time or after an app update.
Those modern apps might be SystemApps (such as StartMenuExperienceHost and ShellExperienceHost) introduced within Windows Cumulative Updates or WindowsApps updated through Windows Update connecting to Windows Store endpoints.
The WindowsApps folder, found at C:\Program Files\WindowsApps, is a protected system directory that contains applications. It's secured to avoid system problems and is typically owned by NT SERVICE\TrustedInstaller to ensure the applications can't be exploited as an attack vector.
Because of this inherent design, you might encounter one of the following problems:
Multiple app folders in the system
If the system has multiple user profiles, apps that each user installs might create multiple app folders because of different versions. These folders reside in the C:\Program Files\WindowsApps hidden folder.
Multiple app versions in the system
Consider the following scenarios:
- Several users sign in at the same time, and Microsoft Store is enabled. One user uses the app during a Microsoft Store background update.
- Some users don't sign in frequently, and Microsoft Store is disabled. The system administrator updates the app manually.
In these scenarios, the system has multiple versions of the app per user, which doesn't affect users. However, the app is reported as vulnerable if the app isn't updated for all users.
Update the app for all users or remove the old packages
To resolve this problem, use one or more of the following methods:
Method 1: Ensure that the app is updated for all users in the system by reconnecting to the machine with user profiles
-
Identify the user profiles in which the old Appx version package is installed by using the Appx cmdlet Get-AppxPackage from an elevated PowerShell window:
Get-AppxPackage <Application Name> -AllUsers -
Reconnect to the machine by using the identified user.
Method 2: Remove the old packages (.appx)
-
From an elevated PowerShell prompt, use the Appx cmdlet Get-AppxPackage to identify the user profiles where the Appx package is installed.
Get-AppxPackage <Application Name> -AllUsers -
Use Get-AppxProvisionedPackage to get a list of all provisioned apps and check if the app is provisioned.
Get-AppxProvisionedPackage -Online | Format-Table DisplayName, PackageName -
Remove the Appx package for all users in the system:
Get-AppxPackage <Application Name> -AllUsers | Remove-AppxPackage -AllUsers[!NOTE] For more information and usage examples about managing Appx packages through PowerShell cmdlets, see the following articles.
Method 3: Delete the user profiles that point to the old version of the app
To delete user profiles, see the following articles:
To confirm that the app is updated for all users and the old packages are removed, scan again or check the C:\Program Files\WindowsApps folder. If you don't have permission to check the folder, create a copy in another location and check inside.
Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.
