• Around The HomeToggle Menu

    • Entertainment
    • Productivity
    • Smart Home
  • FamilyToggle Menu

    • Parenting
    • Toys
    • Pets
    • Travel
  • Product ReviewsToggle Menu

    • Phones
    • Tablets
    • Laptops
    • Desktops
    • Wearables
    • Audio
    • Cameras
    • Headphones
    • Printers
    • Smart Home
    • TVs
    • Gaming and Video
  • One Cool ThingToggle Menu

    • Frugal Tech
    • Kickstarters
    • Videos
Techwalla
  1. Home
  2. Around The Home
  3. Productivity
  4. How to Delete a Virus Program Using the Command Prompt

How to Delete a Virus Program Using the Command Prompt

March 31, 2015
By: Joanne Mendes
  • Share
  • Share on Facebook

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.

Video of the Day

...

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.

Show Comments

Related Articles

Can Someone Put Spyware on Your Phone Without Touching It?

Can Someone Put Spyware on Your Phone Without Touching It?

Around The Home
Entertainment
By: Erik Arvidson
Difference Between a Virus and an Anti-virus

Difference Between a Virus and an Anti-virus

Around The Home
Productivity
By: SofianeBenzaza
How to Fix a Skipping Cursor

How to Fix a Skipping Cursor

Around The Home
Productivity
By: Pat Smith
How to Scan Gmail for Viruses

How to Scan Gmail for Viruses

Around The Home
Productivity
By: Nathan E. Baker
How to Delete an MBR Partition From a Hard Drive

How to Delete an MBR Partition From a Hard Drive

Around The Home
Productivity
By: Josh Baum
How to Remove the Notepad.Exe Virus

How to Remove the Notepad.Exe Virus

Around The Home
Productivity
By: Prescott Carlson
  • HOW WE SCORE
  • ABOUT US
  • CONTACT US
  • TERMS
  • PRIVACY POLICY
  • COPYRIGHT POLICY
  • Advertise

An error occurred. Try again later.

Thanks for signing up!
© 2018 Leaf Group Ltd. Leaf Group Media

Get great tech advice delivered to your inbox.

Keep your family productive, connected, entertained, and safe.

Please enter a valid email.