How to Delete a Virus Program Using the Command Prompt

Anti-virus software can be very expensive and doesn't always find new breeds of computer virus. You can learn to locate and remove a virus yourself without using ant-virus software. By using the command prompt you can enter the infected drive, locate the virus, render it harmless and delete it from your system for good.

...

Step

Click the "Start" menu and type "CMD" into the "Run" box and click "OK."

Step

Select the drive that is infected with the virus. If you are not sure which drive is infected, start with the "C:" drive. Type in "C:" and press "Enter" to access this drive.

Step

Type the following into the command prompt box: - s - h . /s /d and press "Enter." This will bring up any suspicious files located on the drive. Open the suspicious file.

Step

Look for a file that contains a ".exe" file and a file titled "autorun.inf." If you find these two files, you have found the tainted file. Make sure to write down the name of the program where the file is located.

Step

Rename the "autorun.inf" so you can access the drive later without activating the virus. Type: rename autorun.inf as virusfile and close out of the "Command" prompt box.

Step

Double-click the "My Computer" icon and select the drive that has the infected file. Find the program that contains the infected file.

Step

Right-click on the program and choose "Open."

Step

Right-click on the file you renamed "virusfile" and choose "Delete."

Step

Right-click on the ".exe" file and choose "Delete." You have now removed the virus from your computer's hard drive.