Skip to main content

How to Remove a Virus Using Command Prompt

 Virus is a computer program that can copy itself and infect your computer. These viruses can spread via USB/flash drive or from one computer to other computer by few written codes. There are many antivirus software available to remove viruses from computer. But there are some viruses or suspicious files which can’t be removed by any antivirus software. Some suspicious files such as autorun.inf initiate all the viruses in pc. These files must be removed for safe operation of your pc, because they may lead to data loss, software damages etc. Such viruses and files can be removed by using cmd. In this article we will discuss how to remove a virus using command prompt. Following steps can be used to remove a virus using command prompt from your computer.

  •    Go to start menu and type “cmd” in the search box or Start>all programs>accessories>command prompt.

g


  • Open the infected drive such as write , g: to go to G drive.
  • Now type dir/w/a . It will show all the files of the drive including hidden files.

d1


  • Locate AUTORUN.INF or any Virus and other suspicious files in the directory.

autorun

there was no virus in my drive so only autorun.inf is been highlighted.

  • Type command attrib  -r –a –s –h to remove attributes of corresponding file.
ra

dar


  • Now type del virus name.exe t delete it, eg : del newfolder.exe .
(You can also delete viruses by using following steps:
  • When you find an Autorun.inf file or any other unusual .exe file just rename it.
Capture1

Syntax for rename is (rename filename.extension new name ,  for example: (rename autorun.inf virus) to rename autorun.inf file. Here I have renamed it by “virus”.

  • Now you can access the defected drive without affecting the virus.
  • To delete the renamed file go to the defected drive and select the file you renamed.
delvirus


Now delete the harmful renamed files.)
You have deleted that virus successfully but sometimes virus resides in the Recycler folder.To locate this folder:

  • Type cd recycler command.
cr

  • Again type dir/w/a  to locate all file of the folder.
  • Identify malicious files and delete them using above commands.
Follow the above steps carefully and i think this information is enough to remove a virus using command prompt easily.
Important: Make sure that no other processes being running while performing these actions. Best of luck.

Type del autorun.inf to delete autorun.inf file.


Comments

Popular posts from this blog

How To Hide Files Behind JPEG Image

Hiding files by some sort of software has been a very common way till now, but if you are looking for something different you can do it by hiding a file behind a jpg image. It is a quite secured way to hide a file behind JPEG image because none will think about the existence of a file inside a jpg image. It is also free from the hazards of installing those software and consequently nobody will notice there is a secret file hidden behind a jpg picture file.
But here I am going to introduce another interesting way. You can use this simple trick to hide any kind of file like txt, mp3, exe, avi or whatever else. Besides this you can hide multiple number of files behind a single jpg file. When any one will see the picture he/she will just consider it as a picture and even if he/she double click on it then the picture will be opened as normal. Isn’t it sounds interesting? To execute this task you must need WinZip or WinRar to be installed in your PC. You can download it absolutely free from …

How to Create a Password Protected Folder without any Extra Software

There are a lot of methods that you can use to create a password protected folder, most of which require the use of some third party software. Using this neat method you can hide your folders with a quick batch script. It’s important to note that this will not actually conceal your data from somebody that knows what they are doing. Note: if you are a beginner you should be careful with this script Create Your Password Protected Folder
Before you get started you need to create a folder that will house your password protected folder, this is just an ordinary folder and can be located anywhere and named anything. Navigate into your newly created folder and create a new Text Document. This can easily be done from the context menu.
Open the document, now paste the following code into the contents of the document:
cls @ECHO OFF title Folder Private if EXIST "HTG Locker" goto UNLOCK if NOT EXIST Private goto MDLOCKER :CONFIRM echo Are you sure you want to lock the folder(Y/N) set/…

Create Text Speech Program using Notepad

This is an amazing trick. By using this trick you can make a program to speak whatever you type. This trick is working on all Microsoft operating system and does not require any programming skills. You have to follow just simple steps and your own Text to Speech software will be ready. If you show this software to any of your friends he will be certainly impressed with you . Just follow the step given bellow:-
1. Open Notepad and copy and paste the following code into it

Dim message, sapimessage=InputBox("What do you want me to say?","Speak to Me")Set sapi=CreateObject("sapi.spvoice")sapi.Speak message

2.Now save the notepad file with the name speak.vbs at your desktop.
3.Now double click on speak.vbs type in the box whatever you want your computer to speak for you.
Its a really funny trick to impress everybody with your computer skills.....