search
HomeSystem TutorialWindows SeriesHow to Remove a Virus From Your Computer Without Using an Antivirus - Make Tech Easier

Even if you have done your best, viruses can still pass through your defenses and endanger your computer. When you can't rely on antivirus software to fix the problem, this doesn't mean you have to endure the virus or reinstall the operating system. As this tutorial shows, you can help yourself by using the command line, removing the most common culprits without the need for antivirus software.

Table of contents

  • How to know your computer is infected with a virus
  • How do computers get infected with viruses?
  • Things to consider before using the command prompt to remove malware from your PC
  • How to use a command prompt to scan your PC for malware
  • Search and delete viruses from removable drives using the properties command
  • Recover the registry editing function from a virus that deletes the registry editing function
  • What viruses can be deleted on the command line?
  • Frequently Asked Questions

How to know your computer is infected with a virus

If you are sick, you will show up to help your doctor determine the symptoms of your illness. Computers are similar to us in this regard. Once infected, your computer will behave in an unusual way, reminding you that its operating system may be compromised.

How to Remove a Virus From Your Computer Without Using an Antivirus - Make Tech Easier

Here are some examples:

  • Computer performance slows down and it takes longer to get up and run programs.
  • Some files are modified or deleted, and you have not done anything. It should be noted that Windows may delete or add system files during the update process.
  • You may lose access to some or all of your files, especially in the case of ransomware.
  • Although you haven't downloaded them, unusual apps may appear on the desktop and start menus.
  • Your browser may be so slow that it doesn't have the same response speed as a week ago.
  • You will begin to receive duplicate warning notifications from your antivirus software.
  • Unexpected system shutdown and restart.
  • The CPU, RAM, and hard drives are overworked.
  • Some malware can hijack administrator privileges and prevent you from accessing the features of your PC.
  • The program you don't remember starting may run automatically.
  • The program may be closed without you entering.
  • It takes much longer to open Task Manager than usual.
  • Opening a link to a trusted website in your browser will result in pages you don't recognize.
  • Messages or emails you have never written before are sent from you to someone else. You may not be able to notice this immediately unless you receive a confused response from your contacts.

How do computers get infected with viruses?

One way to reduce the risk of malware infection is to understand how computers capture viruses and avoid this. Your computer can get infected with viruses in a variety of ways:

  • Downloading data from an unsafe website may cause your computer to be infected with malware. Most websites that support movies, audio, games and software piracy are full of viruses.
  • Spam also carries malware, and opening any attachments in them can infect your computer.
  • Ads and pop-up notifications can also download malware to your computer when you click on them.
  • Connecting an infected external device can infect your system with viruses.
  • Connecting to an unsafe network may expose your computer to viruses that already exist on the network.
  • Other infected people send messages that contain links to download content, which are sent by viruses to manipulate your curiosity and allow you to open files that can spread it.

Things to consider before using the command prompt to remove malware from your PC

Only when you have a certain understanding of computer work technology can you use the command prompt to delete the virus. Running specific commands with administrator privileges can be risky, and if you misuse them, you can lose data or system files.

How to Remove a Virus From Your Computer Without Using an Antivirus - Make Tech Easier

In addition, command prompts have limitations in removing malware. You can use it to remove some common viruses, but there is nothing you can do with others. For example, it has difficulties dealing with harder enemies like ransomware. For this case, you will need specialized tools to decrypt your files.

How to use a command prompt to scan your PC for malware

Before using the command prompt to remove any viruses from your computer, use tools you already have, such as Windows Defender's virus scanning tool, to scan your system.

How to Remove a Virus From Your Computer Without Using an Antivirus - Make Tech Easier

Most viruses are hidden in your system files or drives, and remain invisible or undetected by changing their properties.

If you can't capture anything with your antivirus, follow these steps to scan for malware using the command prompt:

Use the search bar or run feature to open a command prompt with administrator permissions. You will receive a prompt asking to confirm that you want to use administrator rights on your PC. Click to continue.

How to Remove a Virus From Your Computer Without Using an Antivirus - Make Tech Easier

The command line window will open. Enter sfc /scannow and press Enter to start scanning.

How to Remove a Virus From Your Computer Without Using an Antivirus - Make Tech Easier

Depending on your PC specifications, this process may take some time. Please wait until the scan is completed.

Windows will also try to fix any corrupt files during the scanning process. In some cases, this may solve your problem. If not, you may need to search and delete the virus file from your drive.

Search and delete viruses from removable drives using the properties command

To remove viruses from a specific drive or partition, use the attrib command. This command can be used to quietly find any files that are set to be used by the system or hidden by deleting and displaying these properties. This command is especially effective in USB drives, and viruses like to hide in certain files that are automatically executed by Windows.

"Attrib" syntax

Here is a quick overview of how to use the attrib command. To run the command you have to call it using attrib:

  • r represents read-only attribute
  • s represents system attributes
  • a represents archive attribute
  • h represents hidden attribute
  • Apply selected attributes to files or folders
  • Remove selected properties from file or folder
  • /s search the entire document path, including subfolders in folders
  • / dIncludes any processing folder

This command can help you find many types of viruses, especially those that run from the autorun.inf file in your USB drive.

How to use the 'Attrib' command to delete a virus

First, run the command prompt with administrator privileges.

Once the command prompt is open, use its letter (for example, d: ) to select the drive that may be infected. This will keep all the features you run in one working partition. If you plan to run the attrib command on the main drive, switch to the root folder instead: cd C:\.

Use the command attrib -s -h -r /s /d . to start stripping all files' system, hidden and read-only properties. Files assigned to these properties by the Windows operating system will not be stripped. Instead, you will receive an access denied error.

How to Remove a Virus From Your Computer Without Using an Antivirus - Make Tech Easier

Use Windows File Explorer again to browse the drive. You should see the new file you had hidden before appearing. Deleting read-only properties ensures that you can delete them as you like.

If you are not sure if the file you found using this method is a virus, upload it to a website like VirusTotal or Polyswarm for full confirmation. These two sites match the single file you upload with multiple heuristics and antivirus databases.

Once you are sure that the file you found is a virus, delete it from the system permanently! Restart Windows and you should be at ease.

Recover the registry editing function from a virus that deletes the registry editing function

Some viruses will completely disable your registry editing feature to prevent you from modifying any keys it edits. If you find yourself in this situation, you just need to enter a command.

  1. Open the command line in administrator mode.
  2. Enter the following and press Enter :
 <code>reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System" /t Reg_dword /v DisableRegistryTools /f /d 0</code>

This will restore the registry editing feature of your computer. If you still can't open the Registry Editor, you're either still infected by the virus or have a bigger problem affecting your system integrity and can only be resolved by using Windows installation media to restore the system.

What viruses can be deleted on the command line?

You can use the command line to remove common low-level viruses, such as those that run on the autorun.inf file. For more complex viruses, you will need specialized antivirus software to remove them completely from your system.

Some viruses will copy themselves to the registry. Other viruses may change or delete system files. To delete this virus, you also need to repair the system and restore the files.

When possible, use antivirus software to remove complex malware. If your computer system is infected with ransomware, the command line really won't help you.

Frequently Asked Questions

Can it really be deleted by just deleting it?

If you follow these instructions carefully, you can delete the virus by deleting it. If you already have antivirus software installed, this should not be a problem. Many antivirus programs also delete virus files, and are usually permanent.

Should I use a command prompt instead of an antivirus software to remove the virus?

If you don't have antivirus software installed, you can use the command prompt method to remove the virus, but it won't protect your computer from infection without the advanced features provided by most excellent antivirus software (e.g., quarantines, scans, etc.). You should not rely on this method to keep your computer protected from infection; instead, use it when necessary to remove the virus.

Can viruses survive factory reset?

Normally, it cannot. Resetting your computer will restore it to its pre-purchase status. This is an effective, albeit a thorough way to clean up hard drive viruses and repair damage.

Images and screenshots courtesy of Miguel Leiva-Gomez

The above is the detailed content of How to Remove a Virus From Your Computer Without Using an Antivirus - Make Tech Easier. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Automate Repetitive Tasks via AI-Generated PowerShell Scripts - Make Tech EasierAutomate Repetitive Tasks via AI-Generated PowerShell Scripts - Make Tech EasierMay 16, 2025 am 02:35 AM

I've always held the belief that computers should serve us, rather than the reverse. This belief was tested when I found myself dedicating endless hours to repetitive tasks. However, this changed when I began leveraging artificial intelligence (AI) t

What To Do if There's an Unusual Sign in Activity on Your Microsoft AccountWhat To Do if There's an Unusual Sign in Activity on Your Microsoft AccountMay 16, 2025 am 02:34 AM

Similar to other large companies, Microsoft prioritizes your account security and protection from unauthorized access by individuals with harmful intentions.If Microsoft detects an unusual login attempt, it marks it as suspicious. You will receive an

How to Roll Back a Driver in Windows - Make Tech EasierHow to Roll Back a Driver in Windows - Make Tech EasierMay 16, 2025 am 02:33 AM

Driver issues are quite common in Windows systems. Sometimes, updates to new drivers may cause a Blue Screen of Death (BSOD) error message in Windows. Fortunately, this problem can be solved by rolling back the driver. You can use the Rollback Driver feature to restore the driver update to a previous version to check if it is functioning properly. Here is a detailed guide on how to roll back drivers in Windows. Directory Rollback Driver in Windows What to do if the Rollback Driver option is disabled? FAQ Rollback Driver in Windows Windows comes with some built-in tools designed to detect and resolve possible conflicts in the operating system. This pack

How to Take Full Ownership of Windows Registry Keys - Make Tech EasierHow to Take Full Ownership of Windows Registry Keys - Make Tech EasierMay 16, 2025 am 02:28 AM

The Windows Registry is a central hub for storing all configurations related to the Windows operating system and its software. This is why numerous Windows tutorials often involve adding, modifying, or deleting Registry keys.However, you may encounte

How to Remove 'System Requirements Not Met” Watermark in Windows 11 - Make Tech EasierHow to Remove 'System Requirements Not Met” Watermark in Windows 11 - Make Tech EasierMay 16, 2025 am 02:27 AM

Windows 11 does have strict installation requirements. However, installing Windows 11 on unsupported devices is not difficult. If you have successfully installed it, don't rush to celebrate. You also need to clear the desktop "System Requirements Not Meeted" watermark that Microsoft introduced to prevent installation on unsupported hardware. This guide lists three ways to remove this watermark. Directory Group Policy Editor Windows Registry Editor Script Group Policy Editor If you are using Windows Pro or Enterprise and you have Group Policy Editor enabled, this method is the easiest. Follow the instructions below to disable the watermark through the Group Policy Editor. Enter "Group Policy" in Windows Search and click Edit Group in the results

Microsoft Teams Camera Not Working? Learn How to Fix ItMicrosoft Teams Camera Not Working? Learn How to Fix ItMay 16, 2025 am 02:22 AM

Microsoft Teams is a widely used platform for collaboration and communication within organizations. Despite its effectiveness, you might occasionally face issues with the camera during calls. This guide offers a range of solutions to resolve the came

How to Check Your RAM Type in Windows - Make Tech EasierHow to Check Your RAM Type in Windows - Make Tech EasierMay 16, 2025 am 02:21 AM

If you plan to upgrade your RAM or test its performance, it is important to know your RAM type. This means that your laptop or PC needs to be evaluated to determine the DDR module it supports, as well as other details like the form, speed and capacity of RAM. This tutorial shows how to check RAM types using various Windows applications and third-party tools in Windows. Directory Check RAM type via command prompt Check RAM type via task manager Check RAM type in Windows Check RAM type in PowerShell Check RAM type using CPU-Z Check RAM type using Novabench Check RAM type via visual inspection of motherboard Check RAM type via command prompt Check RAM type

How to Fix 'Local Security Authority Protection Is Off' on Windows - Make Tech EasierHow to Fix 'Local Security Authority Protection Is Off' on Windows - Make Tech EasierMay 16, 2025 am 02:20 AM

Local Security Authority (LSA) protection is a crucial security feature designed to safeguard a user's credentials on a Windows computer, preventing unauthorized access. Some users have encountered an error message stating that "Local Security A

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Clair Obscur: Expedition 33 - How To Get Perfect Chroma Catalysts
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools