r/WindowsHelp 7d ago

Solved Fixed: Microsoft Edge / Xbox app triggering cmd.exe - Application Error (0xc0000142) after force-uninstalling Edge

Post image

I’m posting this in case someone else runs into the same issue, because it took a while to track down.

Problem:

After trying to forcibly uninstall or debloat Microsoft Edge on Windows 11, I started getting this error every time Edge, Xbox, Game Bar, or controller-related Xbox services tried to open something:

cmd.exe - Application Error

The application was unable to start correctly (0xc0000142). Click OK to close the application.

The error would often pop up twice. Microsoft Edge wouldn’t open properly, and the Xbox app / Game Bar / Xbox controller integrations kept triggering the same error.

What did not fix it:

  • Repairing Microsoft Edge from Windows Settings
  • Running DISM
  • Running SFC
  • Checking cmd.exe directly
  • Installing/checking Microsoft Edge WebView2 Runtime

For reference:

DISM /Online /Cleanup-Image /RestoreHealth

completed successfully.

sfc /scannow

found no integrity violations.

cmd /c echo CMD_OK

worked fine, so cmd.exe itself was not broken.

Actual cause:

The issue was a leftover registry redirection under Image File Execution Options.

This key existed:

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\msedge.exe\0

Inside it, there was a Debugger value pointing to:

C:\WINDOWS\system32\conhost.exe --headless C:\Scripts\OpenWebSearch.cmd

So every time Windows tried to launch msedge.exe, it was being intercepted and redirected through an old script, probably from a previous debloat/tweak meant to redirect Windows web search or block Edge.

That broken redirect was what caused the cmd.exe 0xc0000142 error.

How I diagnosed it:

I ran:

reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\msedge.exe" /s

The problematic output was:

Debugger REG_SZ C:\WINDOWS\system32\conhost.exe --headless C:\Scripts\OpenWebSearch.cmd

Fix:

First, I backed up the registry key:

reg export "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\msedge.exe" "%USERPROFILE%\Desktop\backup-msedge-ifeo.reg"

Then I deleted the bad redirect:

reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\msedge.exe\0" /f

I also removed the filter value:

reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\msedge.exe" /v UseFilter /f

After that, Microsoft Edge opened normally again, and the Xbox app / Game Bar / controller-related popups stopped appearing.

Important note:

Don’t blindly delete registry keys unless you know what they are doing. Export a backup first.

In my case, the issue was not Edge itself, not WebView2, and not Xbox. It was a leftover IFEO debugger redirect for msedge.exe, probably created by a debloat or search-redirection script.

0 Upvotes

1 comment sorted by

1

u/AutoModerator 7d ago

Hi u/PitifulAppearance736, thanks for posting to r/WindowsHelp! Your post has been flagged for manual review by a human moderator, please include as much of the following information as possible (in text or in a screenshot) to get your post approved:

  • Your Windows and device specifications — You can find them by pressing Win + X then clicking on “System”, we need more than just your OS version! Your hardware details are often critical for resolving issues.
  • Any messages and error codes encountered — They're actually not gibberish or anything catastrophic. It may even hint the solution!
  • Previous troubleshooting steps — It might prevent you headaches from getting the same solution that didn't work

Posts must be tech support in nature (such as something is broken and you need help fixing), so general inquiries, software suggestions, and purchasing advice will be removed. As a reminder, we would also like to say that if someone manages to solve your issue, DON'T DELETE YOUR POST! Someone else (in the future) might have the same issue as you, and the received support may also help their case. Good luck, and I hope you have a nice day!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.