Skip to content

Failed to retrieve Microsoft Defender status: Process terminated with unexpected result: Not running #2447

Closed

Description

@sratz

Let's make sure issue is not already fixed in latest builds first.

Steps to reproduce

Disable Windows defender completely, e.g. using https://www.sordum.org/9480/defender-control-v2-1/

powershell -Command (Get-MpComputerStatus).AMRunningMode then returns an additional status not documented by Microsoft: Not running.

// https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/microsoft-defender-antivirus-windows#use-powershell-to-check-the-status-of-microsoft-defender-antivirus
case "sxs passive mode", "passive mode", "" -> false; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
case "normal", "edr block mode" -> true; //$NON-NLS-1$//$NON-NLS-2$
default -> throw new IOException("Process terminated with unexpected result:\n" + String.join("\n", lines)); //$NON-NLS-1$//$NON-NLS-2$

should be adjusted to include that.

I wonder: Maybe this method should be more graceful to unknown statuses, e.g. log them and return false instead of throwing an Exception.

Here is some relevant log output

From <workspace>/.metadata/.log

org.eclipse.core.runtime.CoreException: Failed to retrieve Microsoft Defender status.
	at org.eclipse.ui.internal.WindowsDefenderConfigurator.isWindowsDefenderActive(WindowsDefenderConfigurator.java:331)
	at org.eclipse.ui.internal.WindowsDefenderConfigurator.runExclusionCheck(WindowsDefenderConfigurator.java:159)
	at org.eclipse.ui.internal.WindowsDefenderConfigurator.lambda$0(WindowsDefenderConfigurator.java:106)
	at org.eclipse.core.runtime.jobs.Job$2.run(Job.java:187)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.io.IOException: Process terminated with unexpected result:
Not running
	at org.eclipse.ui.internal.WindowsDefenderConfigurator.isWindowsDefenderActive(WindowsDefenderConfigurator.java:328)
	... 4 more

Tested under this environment:

  • OS & version: Windows 11 Build 27729

Activity

  1. added a commit that references this issue on Oct 26, 2024
    c50a1e4
  2. added a commit that references this issue on Oct 29, 2024
    6048bfb
  3. added a commit that references this issue on Oct 30, 2024
    6af4673
  4. added a commit that references this issue on Dec 10, 2024
    c68ddde
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    WindowsHappens on Windows OSbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions