How to Remove a Virus From Your Computer Without Antivirus Software

Take care of viruses plaguing your system

Ones and zeros behind a golden skull and crossbones.

 Gerd Altmann/Pixabay

If you get on the internet or even just use email, there is always the possibility you could end up with a computer virus. If you’re one of the unlucky ones and need to remove a virus from your laptop, don’t despair. There are ways to eliminate your system of viruses without antivirus software. Keep reading to learn how to remove a virus from your laptop or computer without antivirus software.

  1. Look for any newly installed software. If you use your PC regularly, you should be familiar with what software is loaded on your computer. To check for any new or unfamiliar installations go to Settings > Apps. Scroll through the list of Apps & features. If you find something you don’t recognize, select the app and select Uninstall.

    Make sure you research the app first before uninstalling in case it is something your PC needs. 

    Windows settings to add or remove apps.
  2. Check the Task Manager for any suspicious or unfamiliar services. The Task Manager is an excellent tool with many purposes. In this case, you can disable any possible services that a virus may be running which helps you remove that virus when you’re ready. To access Task Manager, on your keyboard, press Ctrl + Shift + Esc. You’ll want to select Services and look through the list that's provided. If you see anything unfamiliar or suspicious, right-click the service and select Stop.

    Windows services shown from the task manager.
  3. Next, check for any unusual apps in your Startup. With the Task Manager still open, select Startup and scroll through the list of startup apps, looking for suspicious files. If you find something Enabled, select it then select Disable.

    A process in Startup task manager is selected.
  4. With the Task Manager still open, select Processes. Once again, scroll through the list looking for anything out of the ordinary. If you do find something, select the item, then select End task.

    You can also access most of these settings in System Configuration utility.

    Ending a task in system processes.
  5. The next step will require you to run the Command Prompt as an administrator. To do this, select Cortana or Search and enter Command in the search box provided. You should see the listing for Command Prompt at the top. Right-click Command Prompt and select Run as administrator.

    Searching for command Prompt in Windows.
  6. Now that you have Command Prompt running, there is a special command that will need to be entered to get rid of the virus on your PC.

    Change to the drive letter where you think the suspected virus is. At the Command Prompt enter driveletter:. Example C:

    Then you’ll want to enter driveletter/ (Example: C/) to get to the root of the hard drive. Now the Command Prompt window should display something like you see in the image below.

    A command prompt window has been opened up.
  7. If the file you suspect is in a different folder, then you’ll need to change directory (CD). To do this, enter CD\filepath where filepath is where you suspect the virus to be. Example: cd\demo.

    Changing to another directory in command prompt.
  8. Now that you’re in the directory where you think the virus is, take a look at the contents by typing dir and press Enter. This will show you the contents of the directory minus any hidden files or folders.

    Command prompt showing the contents of the demo directory.
  9. Next, use the attrib command to change or display file attributes for files and\or folders in Windows. This is useful for removing viruses because attrib will display hidden files, which is often how viruses and malware conceal files. Once revealing these files, you’ll be able to take the next step to get rid of the virus. In the command prompt windows, type the following exactly as shown and then press Enter:

    Attrib -s -h *.* /s /d

    This particular command is telling attrib to clear system attributes (-s), and clear hidden file attributes (-h) to whatever subfolders (/s) and directories (/d). The *.* tells the attrib command to do this to all files.

    Depending on the number of folders and files, you may or may not see the attrib command making changes.

    System files will give you an ‘Access Denied’ error when trying to change file attributes.

    Running the attrib command.
  10. Now that attrib has successfully run, perform another directory listing (dir) to see if any hidden files or folders appear. Look for files like autorun.inf, .exe, .vbm, etc.

    Doing another directory listing to see any changes.
  11. Once you’ve found the suspicious file, you’ll want to remove it. Using the del (delete) command, you can safely remove the virus. At the Command Prompt, enter del filename.extension and press Enter. Example: del autorun.inf.

    Deleting a possibly infected file.
  12. To confirm the deletion, do another directory listing (dir). The offending file should be gone.

    The file has been deleted through the command prompt.

While using antivirus software is the easier solution to removing a virus from your PC, with a bit of effort and patience, you can do it yourself without fancy software.