Friday, June 14, 2024

Know how to remove viruses without antivirus using the command prompt

Users can remove viruses without antivirus using the command prompt. All it takes is an attrib command to show those hidden viruses. Command prompt helps by showing hidden viruses in a drive or partition. From there you can delete those malicious files. Usually, there are CryptoLocker and Locky viruses that cause damage to the system. Sometimes they delete your files, change their file extension to .encrypt or .locky and even encrypt them. 

The ‘attrib’ command means to view, modify, or delete the attributes of files or folders in the chosen location. You can see the virus appear in the folder by removing its “hidden” attribute. You’ll then be able to locate it and get rid of it. 

How to remove virus without antivirus using command prompt

Follow the below-mentioned steps to remove the virus without antivirus, using the command prompt:

- Advertisement -

Step 1: Go to the search bar > right click > choose ‘Command Prompt’ > now choose ‘Run as an administrator’

Step 2: Now Type F then press ‘Enter’ > now substitute F with the first letter of the address of the infected device or partition.

Step 3: Enter the address attrib -s -h -r /s /d *.* > press ‘Enter’

- Advertisement -

Step 4: Enter dir and press ‘Enter.’ Now all the files will be included under the assigned drive. (The dir command includes a list of a directory’s files as well as subdirectories).

Step 5: Virus files consist of words like ‘.inf’ or ‘autorun’ as the extension. So, in case you find any of those files, type ‘del autorun.inf’ to remove the virus without antivirus.

Know more: Four tried and tested methods to remove virus from laptop without antivirus 

Basic features of the ‘attrib’ command:

R- stands for the ‘Read-only’ feature of a file. Read only refers to the ‘file cannot be written on or executed’

H- Stands for ‘Hidden’ feature

A- Refers to ‘Archiving’ which constructs a file for archiving

S- Refers to the ‘System’, which changes the chosen files from user folders into system files.

I- ‘not content indexed file’ feature

This is the “attrib” Syntax:

ATTRIB [+ attribute | – attribute] [pathname] [/S [/D]]

In the above-mentioned command, here are the different switches and parameters:

  • ‘+ / –’: To cancel or to enact the specified attribute.
  • ‘attribute’: As mentioned above.
  • ‘/S’: Searching all over the path including subfolders.
  • ‘/D’: Includes any process folder.
  • ‘pathname’: Path where the destination file or folder is based.

Here is the exact syntax series for the attrib command: 

ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] [+I | -I] [drive:][path][filename] [/S [/D] [/L]]

Note: Carefully use the command prompt. Its improper use can cause system damage. So, make sure before you remove a virus without antivirus using the command prompt, do data recovery beforehand.

What if you receive the message ‘Access denied’

Even if you know how to remove a virus without antivirus using a command prompt, still your access may get denied. In that case, As an administrator, Run Command prompt before you start the process:

  • Don’t keep the file/folder in use
  • Check the current account permission, and don’t forget to have full control over your file/folder (right-click the file, folder, and partition and then go to ‘Security’) 
  • Use command CHKDSK to look over file system errors (run CMP then enter CHKDSK/f [drive letter]

Read More: Does Your Android Phone Need An Antivirus App?  

Automatic command line to remove viruses without antivirus using command prompt

Manual execution will be fun if you are a computer professional since incorrect commands can be damaging to your system. So, here comes an automatic command line (EaseUS CleanGenius), a tool that can help users to remove viruses without antivirus using a command prompt. It performed the functions of a command prompt. It checks and corrects system errors, enables or disables write protection, and updates the system using one click rather than typing intricate command lines. 

Here are the steps to reveal hidden files using automatic command line software:

Step 1: Download free EaseUS CleanGenius

Step 2: Open the download app > go to the left panel > choose ‘Optimization’ 

Step 3: Now click ‘File Showing’ available on the right side

Step 4: Choose the hard drive and click ‘Execute’

Step 5: Once the process completes > click on the link to show hidden files

Wrap-up

CMD command is not a sure-shot solution to remove viruses without antivirus using a command prompt, still, it works in maximum cases. In case it doesn’t work for you, you can go for anti-virus options to get rid of harmful files. Also, virus attacks can cause data loss. In such a case you can go for hard drive software – EaseUS data recovery Software, it’ll help you to recover lost files as early as possible. Hopefully, now you know how to remove viruses without antivirus using the command prompt. Tell us in the comment section, which method worked for you.
Read More: How to Protect Your Computer from Hackers & Viruses with Ease

- Advertisement -
Palak Sharma
Palak Sharma
I am Palak, born and brought up in Himachal Pradesh. An introvert by nature who loves writing more than speaking. I do it often to express myself, to entrain myself, and to feel meaningful. While enjoying this world of words I ended up being part of a published anthology 'Blooming skies' with my poem 'On the day of devastation'. I love this concept of written words living on a paper till the end of time, they give me a sense eternity.

Related Articles

Stay Connected

2,814FansLike
179FollowersFollow
1,600SubscribersSubscribe
- Advertisement -spot_img

Latest Articles