MicrosoftSecurityApp.exe Bad Image: Error 0xc0e90002 [Fix]
Get rid of any additional app installations
4 min. read
Updated on
Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more
Key notes
- To fix the MicrosoftSecurityApp.exe Bad Image error, uninstall the downloaded Windows Security or switch out of S Mode.
- The problem arises due to missing or corrupt system files (DLLs) and restrictions enforced by the OS.
- Keep reading to find out how Windows Report experts fixed things in no time!
Many users reported getting a MicrosoftSecurityApp.exe – Bad Image error, where it states that the System.Xml.Linq.ni.dll file is either not designed to run on Windows or it contains an error.
The error message appears before signing into the PC and is encountered on Windows 11. Even with the error, other apps and processes, both built-in and third-party, continue to run fine.
What is a Bad Image error?
A Bad Image error appears when the files required to run the program are missing or corrupted. Besides, the problem also arises when other apps conflict with the program or access the same set of shared files simultaneously.
How do I fix the MicrosoftSecurityApp.exe Bad Image error?
Before we start with the slightly complex solutions, try these quick ones:
- Restart the PC and check for improvements.
- Check for any pending Windows Updates and install them.
- Disable any third-party antivirus or similar security software installed on the PC.
1. Uninstall the other Microsoft Defender app
- Press Windows + I to open Settings, go to Apps from the navigation pane, and then click on Installed apps.
- Locate Microsoft Defender or Windows Security from the list, click the ellipsis next to it, and select Uninstall.
- Again, click Uninstall in the confirmation prompt.
- Once done, reboot the PC and check whether the MicrosoftSecurityApp.exe Bad Image error disappears.
The most common reason you get the Bad Image error is due to the presence of multiple instances of the built-in antivirus, Windows Security/Microsoft Defender, existing on the PC. So, uninstall the app, and things should be up and running!
2. Repair the corrupt system files
- Press Windows + R to open Run, type cmd, and hit Ctrl + Shift + Enter.
- Click Yes in the UAC prompt.
- Paste the following three DISM commands individually and hit Enter after each:
DISM /Online /Cleanup-Image /CheckHealth
DISM /Online /Cleanup-Image /ScanHealth
DISM /Online /Cleanup-Image /RestoreHealth
- Once done, execute this command to run the SFC scan:
sfc /scannow
- Finally, reboot the PC for the changes to come into effect.
You will need to repair the corrupt system files in order to fix the MicrosoftSecurityApp.exe Bad Image error. So, run the DISM commands and SFC scan, and the two will automatically replace all problematic system files with their cached copy.
3. Replace the problematic DLL
If it’s the DLL file to blame, you can replace it with another copy from a healthy PC with the same configuration.
Copy the System.Xml.Linq.ni.dll file to a USB drive on the other computer, and then paste it in the following path on the affected PC after deleting the existing version: C:\Windows\assembly\Nativeimages_v4.0.30319_64\System.Xml.Linq\a3c635436ca5e274374c4389b2f1132d\
An easier fix is to use an effective DLL repair tool because it can proceed with this action automatically and spare you further errors.
4. Switch out of S Mode
- Press Windows + I to open Settings, select System from the navigation pane, and click on Activation on the right.
- Expand the S mode section, and click the Open Store button.
- Click on Get under Switch out of S mode.
- Once the confirmation prompt appears, reboot the device and check for improvements.
A few who faced the Bad Image Error Status 0xc0e90002 with Microsoft Office or other third-party apps fixed it by switching out of S Mode, a slightly restrictive OS environment with enhanced security and speed. So, you may try that!
5. Perform an in-place upgrade
- Go to Microsoft’s official webpage, select the OS edition and product language, and then download the Windows 11 ISO.
- Run the ISO file and click on Open in the confirmation prompt.
- Double-click the setup.exe file.
- Click Yes in the UAC prompt.
- Click Next to proceed.
- Now, click on Accept to agree to Microsoft’s license terms.
- Finally, verify that the setup reads, Keep personal files and apps, and click the Install button to start the in-place upgrade. It may take 1-3 hours to complete.
After the in-place upgrade, you shouldn’t encounter the MicrosoftSecurityApp.exe Bad Image error anymore. Remember, this is as good as reinstalling Windows. It will re-download all the critical system files, DLLs, and other built-in components but won’t affect the stored data.
Once you have fixed things, make sure no other DLLs are missing to prevent any app from throwing similar errors.
For any queries or to share what worked for you, drop a comment below.
User forum
0 messages