Computer

This is how I remove any virus on a computer without installing or using an antivirus

Both Windows 10 and Windows 11 include a native antivirus called Microsoft Defender, a perfectly valid antivirus to keep our computer protected against any type of threat. But, in addition, we can also resort to the command line to eliminate any virus that sneaks into our computer, without the need to use the Microsoft solution or third-party software.

The first thing to keep in mind is that, as it is the command line, it is necessary, first of all, to have administrator permission to be able to make the necessary changes in the system to be able to delete the infected file. If we do not have knowledge of CMD, and we do not want our computer to stop working due to any modification we make, it is better to trust Windows antivirus.

Another aspect that we must be clear about is that through the command line we can delete infected files, but not all kinds of malware, so it is not a solution to any problem generated on our computer by an infected file. Once we are clear about what we can do and what not through the command line, we will show you how to eliminate viruses that have ended up residing permanently on our PC.

Find viruses in Windows from CMD

The first thing we must do is find which files have recently changed their properties to hide within system files or directories. To do it, we are going to use the native SFC tool always with administrator permissions.

sfc /scannow

This tool will scan your computer for changes and will try to repair the modifications on the drive where we run the command, which will generally be drive C: If we want to examine other drives, we must run this command on the corresponding drive.

Repair CMD virus

To switch between units, we just have to write the letter corresponding to the unit followed by “:” without the quotes. To change to drive D, we must type:

d:

Remove viruses from the command line

Once we have detected the malicious file, having been received by email or which makes us raise an eyebrow more than normal, we use the command attriba command that allows us to modify the properties of the files so that they are no longer read-only, show hidden files and so on, along with Of the to delete the infected files.

Once we have opened CMD with administrator permissions, we will use the following command with the parameters -s (remove System ownership), -h (show hidden files), /s (search all directories in a path) and /d ( to include Hot Folders).

dir "unidad:" attrib -s -h /s /d * . *

once we have identified the unwanted filewe just have to type in the command line the Del command followed by the name of the file along with the extension in the location where it is located.

del nombrevirus.extensión

Using the command line to remove any virus is a quick and useful task as long as we know where to go. If not, it is better to use Windows Defender antivirus solution or any other antivirus.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *