Windows Defenders - Windows cannot remove Microsoft.Windows.SecHealthUI_10.0.19041.1023_neutral__cw5n1h2txyewy because the current user does not have that package installed
I hate McAfee, not only it constantly changing my browser search engine to the useless Secure Search, it "remove" or "deregister" my Windows Defenders when I uninstall McAfee.
Once McAfee is uninstalled, I could not open Windows Defender and it complains with the following
Amazingly, the uninstall only destroy the installation of the user who uninstall McAfee. Other PC users are able to access Windows Defender.
Anyhow, after reading multiple blogs, I tried to open the PowerShell as administrator and run the following command
Get-AppxPackage *Microsoft.Windows.SecHealthUI* -AllUser | Reset-AppxPackage
But, it returns with error
Reset-AppxPackage : Package was not found.
Windows cannot remove Microsoft.Windows.SecHealthUI_10.0.19041.1023_neutral__cw5n1h2txyewy because the current user does not have that
package installed. Use Get-AppxPackage to see the list of packages installed. At line:1 char:60 + ... xPackage *Microsoft.Windows.SecHealthUI* -AllUser | Reset-AppxPackage + ~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Reset-AppxPackage], COMException + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.Windows.Appx.PackageManager.Commands.ResetAppxPackageCommand
Next, I do note that some blogs suggested the following action
Add-AppxPackage -Register -DisableDevelopmentMode “C:\Windows\SystemApps\Microsoft.Windows.SecHealthUI_cw5n1h2txyewy\AppXManifest.xml”
but that path does not exist in my system - including "C:\Windows\SystemApps\Microsoft.Windows.SecHealthUI". Duh - each installation uses different installation location, doesn't it?
After days of research, I found the post How to solved error with Windows defender when update from Win10 to Win11. Although this post started with Reset-AppxPackage recommendation, a User suggested the following
add-appxpackage -disabledevelopmentmode -register ((Get-AppxPackage Microsoft.SecHealthUI -allusers).InstallLocation + '\AppxManifest.xml')
This is effectively the similar command to the other Add-Appxpackage command, except the AppxManifest.xml is resolved based on Get-AppxPackage.
And the more important thing - it works!!! I can now open Microsoft Defender UI!!
Ending Note - The suggestions from other blog may work if I knew Get-AppxPackage Microsoft.SecHealthUI would return InstallLocation of Windows Defender.
Comments
Post a Comment