How to remove Virus using CMD?

Configurare noua (How To)

Situatie

Viruses and malware can wreak havoc on your computer, causing slow performance, data loss, and security breaches. While there are numerous antivirus programs available, using Command Prompt offers a powerful and direct method to remove viruses without the need for additional software. CMD is a built-in tool in Windows that can help you identify and eliminate malicious files effectively.

Solutie

Pasi de urmat

Remove the Virus Using Del Command

Open the Command Prompt

In the search bar, type “CMD” then right-click on “Command Prompt” and choose “Run as administrator”. Running Command Prompt as an administrator gives it extended permissions needed to access all files and folders.

Select the Infected Drive

Type the drive letter of the infected drive followed by a colon (for example “E:”) and press “Enter”. This will switch you to the drive that contains the virus or malware. Replace ‘X’ with the appropriate infected drive letter.

2

Key Attributes

Type “attrib -s -h -r -a /s /d” and press “Enter”. This will remove key attributes from files that might prevent deletion. The attributes that are removed are system, hidden, read-only, archive, files in subfolders, and empty folders. Removing attributes allows infected files and folders to be deleted.

Command: attrib -h -s -r /s /d *.*

Output:

4

Delete the Program

Now type “del autorun.inf” and press Enter. This deletes the autorun.inf file which is commonly used by viruses and malware to execute automatically. Getting rid of this can disable some infections. Find the Suspicious file or Program that doesn’t belong to your computer to delete the file enter the following command.

Command: del ( Enter_the_Program_name_here )

5

Remove the Virus Using Taskkill Command

Step 1: Open the Command Prompt

Open Command Prompt as an administrator like before by searching for CMD, right-clicking Command Prompt, and select “Run as administrator”.

Step 2: List the Files using Tasklist Command

Type “tasklist” and hit enter. This displays a list of currently running processes and programs on your computer.

Command: tasklist

6

Tip solutie

Permanent

Voteaza

(2 din 5 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?