Note: This is a repost from an original post on StackOverflow. I was directed here by a helpful user, and am simply reposting.
I made a StackOverflow account for the first time due to this annoying issue. I was solving vulnerabilities on a Test PC VM at my current job to test some new procedures, and one of the vulnerabilities involved the preinstalled application "Paint3D" (Specifically QID 91774 for those interested). Long story short, the vulnerability was simply "outdated app version". After updating Paint3D to the newest version and confirming as such with Powershell, I noticed that our vulnerability management software kept detecting Paint3D as an outdated version. The vulnerability was detected by querying the WMI object "WIN32_InstalledStoreProgram", like so:
snip of "Threat Detection Logic" method After seeing this vulnerability still occur even after updating to the newest version, I went ahead and simply uninstalled Paint3D via Settings > Apps menu.
When I queried the same WMI object manually using Powershell commands "Get-WmiObject Win32_InstalledStoreProgram" and "Get-WmiObject Win32_InstalledStoreProgram | Format-List -Property Name, Version" I noticed there were 2 entries for the app I uninstalled (Microsoft.MSPaint). One was the old version that I updated from, the other was the new version that I updated to. Both were uninstalled and confirmed to be uninstalled. I uninstalled a separate app (Weather) to see if maybe the WMI object does not update automatically, but upon uninstall and confirmation using the above Powershell commands, the Weather app was confirmed to be uninstalled and removed as an entry in the WMI object, while the two different versions of Microsoft.MSPaint remained. I also uninstalled the normal version of "Paint" in case that was the issue, but the two entries remain.
Now for the tricky part. Microsoft Store gives me different error messages each time I try to install Paint3D. I believe it's due to MS Store also querying the same WMI object and, seeing that I have two "versions" of "Paint3D", fails to install anything. I am at my wit's end with this tiny issue. The fix I plan on implementing is just wiping this VM and continuing vulnerability solution procedures, but I really do want to understand why this is happening and what could possibly be causing this issue. I have read some documentation about manually editing and updating WMI objects, however I don't know enough about WMI or WMI objects in order to be confident and effective. It's such a simple task: update or uninstall Paint3D. I simply had no idea I would run into this, and would like to understand at least what is happening.
Snip of WMI object showing outdated MSPaint version
Snip of WMI object showing current MSPaint Version, however Paint3D is uninstalled altogether
Edit 1, 12:20 AM 9/1/2021: Just a follow up, I tried removing my AD User from the system and getting a clean log in, yet Paint3D still was deleted and Microsoft Store was still inoperable. This issue is only specific to that specific desktop.