views:

44

answers:

2

The Windows Defender disc scan takes a lot of performance from the system. Is there any way for a C# application to find out if the disc scan is currently running?

A: 

example using IE:

Process[] ProcInfo=System.Diagnostics.Process.GetProcessesByName("iexplore");

cookre
+1  A: 

You can probably determine this by looking up the process MSASCui.exe.

Try this code snippet:

using System.Diagnostics;    

Process[] procList = System.Diagnostics.Process.GetProcessesByName("MSASCui");

bool defenderIsRunning = ProcInfo.Length > 0;
Magnus Johansson