How to Find Virus with Attrib Command: 11 Steps

Table of contents:

How to Find Virus with Attrib Command: 11 Steps
How to Find Virus with Attrib Command: 11 Steps

Video: How to Find Virus with Attrib Command: 11 Steps

Video: How to Find Virus with Attrib Command: 11 Steps
Video: Permanently Change Process Priority Windows 10/11 | NO TOOLS USED 2024, November
Anonim

This wikiHow teaches you how to find and remove any known virus from your Windows computer. To remove the virus, you will use the command line interface.

Step

Method 1 of 2: Opening the Command Line

Locate Viruses Using the Attrib Command Step 1
Locate Viruses Using the Attrib Command Step 1

Step 1. Open the Start menu

Click the Windows logo in the lower-left corner of the screen, or press the Win key on your keyboard.

If you're using Windows 8, hover over the top-right corner of the screen and click the magnifying glass icon that appears

Locate Viruses Using the Attrib Command Step 2
Locate Viruses Using the Attrib Command Step 2

Step 2. Enter command prompt in the search field

Your computer will search for the Command Prompt application, and the search results will appear at the top of the Start menu.

If you are using Windows XP, click Run on the right side of the Start menu

Locate Viruses Using the Attrib Command Step 3
Locate Viruses Using the Attrib Command Step 3

Step 3. Right-click the black box icon in the search results to display the context menu

If you are using Windows XP, enter cmd.exe in the Run window

Locate Viruses Using the Attrib Command Step 4
Locate Viruses Using the Attrib Command Step 4

Step 4. Click the Run as administrator option at the top of the menu

A command line window will open with Administrator privileges.

  • Click Yes when the User Account Control window appears.
  • If you are using Windows XP, click OK to open a command line window.
  • If you are using a public computer, someone else's computer, or a computer on a network (such as a school/library computer), you may not be able to open the command line interface with Administrator privileges.

Method 2 of 2: Finding and Removing Virus

Locate Viruses Using the Attrib Command Step 5
Locate Viruses Using the Attrib Command Step 5

Step 1. Enter the directory name

Generally, directory names are drive letters (such as C:).

Locate Viruses Using the Attrib Command Step 6
Locate Viruses Using the Attrib Command Step 6

Step 2. Press Enter to set the search location

The command line interface will limit the search to the directory you choose.

Locate Viruses Using the Attrib Command Step 7
Locate Viruses Using the Attrib Command Step 7

Step 3. Enter the command

attrib -r -a -s -h *.

*. The attrib command will forcibly show all hidden, read-only, archive, or system files in a command line window, and the "-r -a -s -h *.*" parameter will unmark hidden, read-only, archive, or system on files that don't necessarily have that flag.

System files will not be affected by this command. You'll see the description Access Denied when the command line interface accesses system files

Locate Viruses Using the Attrib Command Step 8
Locate Viruses Using the Attrib Command Step 8

Step 4. Press Enter to display all hidden file names

Locate Viruses Using the Attrib Command Step 9
Locate Viruses Using the Attrib Command Step 9

Step 5. Swipe the screen to find the virus

If you know the name of the virus, all you have to do is swipe through the command line screen. Otherwise, just find the suspicious.exe and.inf files.

  • Before proceeding, search the internet for suspicious file names.
  • Generally, viruses hide in the "autorun.inf" and "New Folder.exe" files.
Locate Viruses Using the Attrib Command Step 10
Locate Viruses Using the Attrib Command Step 10

Step 6. Enter the command del [filename] and press Enter to remove the virus from the computer

For example, to remove the "autorun.inf" virus, use the command del autorun.inf

Locate Viruses Using the Attrib Command Step 11
Locate Viruses Using the Attrib Command Step 11

Step 7. Close the command line window

Now, the virus will be gone from your computer. Therefore, the computer will run a little faster.

Recommended: