Windows Defender is the security software that protects your PC against different types of malware, including viruses, spyware, and other kinds of malicious code that may cause harm to your device.
Although you can choose from a slew of alternative antivirus software, Windows Defender has been improving over the years, and it has proven to be a robust security solution. You don’t only get real-time protection and free updates, but for advanced users, there is even a command-line utility to manage and schedule custom tasks.
Furthermore, you can also use the command-line utility to create scripts to quickly run certain tasks and keep your computer running smoothly.
In this Windows 10 guide, we’ll walk you through the steps to create different shortcuts using specific commands to run a full or quick virus scan with a single double-click. Plus, we’ll show you a quick way to scan the Downloads folder for infected files without even having to open File Explorer.
How to create a shortcut to do a full scan using Windows Defender
Instead of opening up Windows Defender, you can use the following steps to create a shortcut to run a full virus scan on your computer:
- While on the desktop, right-click, and from the context menu select New, and click Shortcut.
- Copy the following commands and paste it in the location of the item field, and click Next:
"%ProgramFiles%\Windows Defender\MpCmdRun.exe" -Scan -ScanType 2
Or as an alternative, you can use the following command, which will start a full scan while opening the Windows Defender interface:
"%ProgramFiles%\Windows Defender\MSASCui.exe" -FullScan
Also, you can use the same command but adding the -Hide switch to run the full scan with the Windows Defender interface minimized.
"%ProgramFiles%\Windows Defender\MSASCui.exe" -FullScan -Hide
- Enter a custom name for the shortcut, such as “AV Full Scan” and click Finish.
- Right-click the shortcut and select Properties.
- Click the Change Icon button.
- In Change Icon, enter the following path and press Enter::
%ProgramFiles%\Windows Defender\MSASCui.exe
- Select the Windows Defender icon and click OK.
- Click Apply.
- Click OK to complete the task.
Once you completed the steps, simply double-click the shortcut to launch a full scan using Windows Defender.
How to create a shortcut to do a quick scan using Windows Defender
If you prefer, you can create a shortcut to do a quick malware scan on your computer with a single double-click with the following steps:
- While on the desktop, right-click, and from the context menu select New, and click Shortcut.
- Copy the following commands and paste it in the location of the item field, and click Next:
"%ProgramFiles%\Windows Defender\MpCmdRun.exe" -Scan -ScanType 1
Or as an alternative, you can use the following command, which will start a quick scan while opening the Windows Defender interface:
"%ProgramFiles%\Windows Defender\MSASCui.exe" -QuickScan
You can use the same command but adding the -Hide switch to run the quick scan with the Windows Defender interface minimized.
"%ProgramFiles%\Windows Defender\MSASCui.exe" -QuickScan -Hide
- Enter a custom name for the shortcut, such as “AV Quick Scan” and click Finish.
- Right-click the shortcut and select Properties.
- Click the Change Icon button.
- In Change Icon, enter the following path and press Enter:
%ProgramFiles%\Windows Defender\MSASCui.exe
- Select the Windows Defender icon and click OK.
- Click Apply.
- Click OK to complete the task.
Once you completed the steps, simply double-click the shortcut to launch a quick virus scan using Windows Defender.
Bonus: How to quickly scan Downloads folder for malware
If you usually download a lot of files from the internet, instead of doing a full scan, you can setup a batch file to scan only the Downloads folder on-demand to make sure you didn’t download any file that can harm your computer.
- Open Notepad.
- Copy and paste the following commands:
"%ProgramFiles%\Windows Defender\MpCmdRun.exe" -Scan -ScanType 3 -File %userprofile%\Downloads @pause
- Click on File.
- Click on Save as.
- Pick a descriptive name, such Scan_Downloads, and append the .bat file extension.
Now simply double-click the Scan_Downloads.bat file to begin the scan on the Downloads folder.
If the scan return code is 0, the no malware has been found, or it was successfully removed. And if the scan returns code is 1, then a malware was found and couldn’t be cleaned.
It’s worth pointing out that you’re not limited to scan the Downloads folder, you can always change the folder path %userprofile%\Downloads on step 2 and replace it with the location you want to do a quick scan for malware.
Remember that the Windows Defender command-line utility (MpCmdRun.exe) includes a number of features you can use to get even more creative.
While we’re focusing this guide on Windows 10, these instructions should also work with previous versions of the operating system, including Windows 8.1 and Windows 7.
[Source:-wINDOWS CENTRAL]