System hacks: Using commands to quickly invoke Windows Defender

If you need to customize the task of a special anti-kill program, or if you need to call it from a software or web page, it is most convenient to call Windows Defender in the command mode.

The program used to execute Windows Defender by command is MpCmdRun.exe, which is located in the installation directory of Windows Defender. the essence of the MpCmdRun.exe program is the rich parameters it contains to run, and we will use several common parameters in this article. More parameter descriptions can be obtained by directly running the following command (Figure 1).

“%ProgramFiles%Windows DefenderMpCmdRun.exe”

1922A-MLDY-1

1. Perform a quick check

To perform a quick check on the system, you can use the following command (Figure 2).

“%ProgramFiles%Windows DefenderMpCmdRun.exe” -Scan -ScanType 1

1922A-MLDY-2

The -Scan parameter in the above command means start scanning for malware, and “-ScanType 1” means the scan type is quick scan.

After the command is executed, you can see the Scan starting message displayed in the window, and the program is silently executing the fast scan task. When the scan is finished, the scan result is displayed and Scan finished information is shown. 2.

2. Perform a full scan to check and kill

Similar to the previous case, if you want to call a full scan instead of a quick scan, just change the parameter “-ScanType 1” in the above command to “-ScanType 2”. “-ScanType 2” means full scan. The complete command is as follows.

“%ProgramFiles%Windows DefenderMpCmdRun.exe” -Scan -ScanType 2

3. Create a shortcut to check for updates

If you need to check for Windows Defender definition updates, this can be done with the following command line (Figure 3).

“%ProgramFiles%Windows DefenderMpCmdRun.exe” -signatureupdate

1922A-MLDY-3

The parameter “-signatureupdate” means to check for new definition updates.

4. Calling from software or web pages

To invoke the above commands in software or web pages, you can directly use the functions that come with your programming language or web page editing software. For example, the system() function or popen() function can be used in C++, and the runtime.exec() function in jsp scripts can be used in web pages. Just write the above commands to the specific functions.

Leave a Comment