Beruflich Dokumente
Kultur Dokumente
For starters a virus is a self- replicating computer program that infects your computer. These
viruses are a menace and can spread across multiple computers via USB/flash drives, external
media and other means. As we all know, there is a multitude of anti-virus software. To our
dismay, not all of them can do the trick. Sometimes, even your antivirus can fail to detect some
sort of viruses. Well, in such case, CMD prompt may be the solution to help you solve the virus
issues. Most of us grapple with viruses like Autorun.inf, newfolder.exe, ravmon.exe, svchost.exe
etc. They usually present themselves as files and sometimes they can even be files hidden from
you.
To remove a virus using CMD, we shall use a CMD known as attrib command. Therefore first
we have an obligation to know a few basics of the attrib command.
R represents the read only attribute of a file or folder. Read only means the file cant be written
or executed.
H H stands for the hidden attribute.
A Similarly A stands for Archiving and this prepares a file for archiving.
S This attribute changes the selected files or folders in a system file from a user file by
assigning the system attribute of that particular file.
And with the above command there are different parameters and switches so lets see what they
are.
ATTRIB{+R/-R}{+A/-A}{+S/-S}{+H/-H}{+I/-I}{drive:}{path}{/S[/D][/L]}
After knowing all of the basics, now lets give it a shot and try to see how we can remove a virus
from USB, SD card etc. using CMD prompt.
For example, lets transfer an autorun.inf virus from my USB to my D drive and delete the virus
from the D drive.
Step 3. Type attrib and press enter. This command lists out all files inside the current drive
and you will clearly see autorun.inf virus listed.
Step 4. At this stage to remove the virus using CMD, type into command prompt attrib r a
s h . And press enter. This in turn will remove the read only, archive, system and hidden file
attribute from all the files.