Skip to main content

Remove Virus From USB Flash Drive Using Command Prompt


  
Viruses are usually spread across multiple computers using USB Flash drives, external media, connected networks and the Internet. If a USB drive is infected with a virus, it will get activated when we open the USB drive on our computers.
This is because of the auto-run functionality in Windows. Windows looks for autorun.inf file in the USB drive. The autorun.inf file contains information about which program to run when the USB flash drive is opened.
The viruses tend to push their information in the autorun.inf file and then execute automatically from there. The safest way to use the USB flash drives without infecting your own system is to disable the Auto Run functionality of Windows.
To disable Auto Run functionality in Windows, do the following:
  1. Go to Run –> gpedit.msc. This will open the Group Policy Editor.
  2. Navigate to Computer Configuration –> Administrative Templates –> Windows Components –> AutoPlay Policies
  3. In the right hand pane, enable “Turn off Autoplay” setting.
Autoplay group policy
This will prevent Windows from automatically using autorun.inf file in the USB drive.
If your USB drive is already infected with a virus, you can safely delete the autorun.inf file and then scan the USB drive with an antivirus to make sure that the USB drive is clean from all malware.
Autorun.inf can be deleted in two ways. First by using Windows Explorer:
  1. Press Windows Key + E to open Windows Explorer. From the left hand tree, open the USB drive. This should not trigger the auto run functionality of USB.
  2. Now from the left hand content pane, delete the autorun.inf file. Make sure that you are showing hidden files from Folder Options as autorun.inf is usually a hidden file.
Secondly, you can also delete the infected autorun file from command line.
  1. Go to Run –> cmd. This should open the command prompt.
  2. Type g:\ where g is the USB drive letter.
  3. Now run the following command: attrib -h -r -s -a *.*. This will remove the attributes hidden, archive, system from all the files.
  4. Type del autorun.inf. This will delete the autorun.inf file.
If you want to make sure that in addition to the autorun file, the virus is also removed from the USB drive, you will need to open the autorun.inf file in notepad and see which files and executables are triggered during autorun. Delete those executables and you will be safe from the wrath of USB viruses.
I hope this will be useful for you. Do let me know whether it was useful for you or not.

Comments

Popular posts from this blog

Jinsi ya kuhifadhi contacts katika akaunt ya Google (How to Backup Contacts to Google Drive)

  How to Backup Contacts to Google Drive “Don’t overload your heart by learning all the contacts when you can rest this task on new technological solutions.” – Anonymous Well, there is an automatic syncing feature for data backup to Google on an Android phone. So, it's a default feature of Google Drive, specifically in Android phones. However, the core concept lies in knowing how to backup contacts to Google Drive in a separate folder. Furthermore, it would help if you did the entire thing manually with regards to the iPhone. Most importantly, Google Drive is free to use, accessed by the current Google account. So, why won't you take benefits of such a top-notch Google's product service? However, please note that Google is prone to hacking unless you are using a robust security system. Also, the server speed slows down when millions of users upload and download things simultaneously. So, kindly take note of these facts before you learn how to save contacts in Google Drive. ...

VIRUTUBISHI , MAKUNDI YA VYAKULA NA MLO KAMILI

  VIRUTUBISHI,MAKUNDI YA VYAKULA NA MLO KAMILI Utangulizi: Chakula ni muhimu kwa binadamu wote. Chakula huupatia mwili virutubishi mbalimbali kwa ajili ya kuuwezesha kufanya kazi mbalimbali. Ili kuwa na hali nzuri ya lishe ni vyema kuzingatia ulaji unaofaa ikiwa ni pamoja na mlo kamili. Ulaji unaofaa ni muhimu kwa watu wote. Ulishaji unaofaa kwa watoto kulingana na umri ni muhimu hasa kwa ukuaji na maendeleo yao. Maana ya maneno yanayotumika katika masuala ya lishe Chakula   ni kitu chochote kinacholiwa na kuupatia mwili virutubishi mbalimbali. Chakula huupatia mwili nguvu, kuulinda na kuukinga dhidi ya maradhi mbalimbali. Mfano wa chakula ni ugali, wali, maharagwe, ndizi, viazi, mchicha, nyama, samaki, matunda n.k. Lishe   ni mchakato unaohusisha hatua mbalimbali za jinsi mwili unavyokitumia chakula kilicholiwa. Hatua hizi ni kuanzia chakula kinapoliwa, jinsi mwili unavyokisaga na kukiyeyusha, umetaboli na hatimaye virutubishi kufyonzwa na kutumika mwilini. Virutubish i...

How to live longer

  How to live longer: The cholesterol-lowering fruit that could ward off high blood pressure HIGH blood pressure and high cholesterol are often found operating in conjunction with one another. When left untreated, both conditions can set the stage for serious heart complications, making them risk factors for premature death. One fruit, however, has been shown to offer drastic improvements for both conditions. Evidence to support the health benefits of eating fruits and vegetables keeps piling in. Studies have identified excess body fat as one of the dominant predisposing factors to blood pressure elevation. Therefore, eating a diet rich in whole grains, fruits, vegetables and low-fat dairy can also lower blood pressure. Apples, in particular, contain many of the elements that could help stave off further complications down the road. High cholesterol: Apples could help lower LDL levels  (Image: Getty ) Apples provide minerals such as potassium and substances called flavonoids, ...