USB Shortcut Virus: How to Permanently Remove It

Explore the different ways to get rid of the shortcut virus

Reading time icon 6 min. read


Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team Read more

Key notes

  • Shortcut viruses in the USB drive prevent you from retrieving the files stored on it.
  • Downloading files from suspicious websites is the most probable reason for the spread of viruses.
  • USB shortcut viruses can be easily removed by executing a .bat file with the deletion code.
USB shortcut virus
ESET HOME comes with all the security tools that you may ever need to protect your data and privacy, including:
  • Anti-theft support
  • Banking-level encryption
  • Advanced digital threat protection

USBs are external drives that come in handy when transferring files and essential documents to different places. Like other drives, USBs are prone to several sorts of viruses, the shortcut virus being the sneakiest.

If your USB stick gets affected by the shortcut virus, all the files, folders, and icons stored on it become inaccessible and gradually start changing into shortcuts.

How does the shortcut virus spread to your USB? 

There are several ways by which the shortcut virus may have spread to your USB drive:

  • Accidentally connecting your USB drive to a computer infected with a shortcut virus. 
  • Downloading executable files from untrusted online sources with a virus hidden in the bundled programs. 
  • Mistakenly clicking the suspicious pop-ups and banner ads that appear on your screen when surfing the web. 
  • Clicking the links on the suspicious email received from anonymous sources. 
  • If the antivirus is not active on your PC, the chances of your USB catching the shortcut virus are quite high. 

If you are looking for ways to fix the USB shortcut virus, look no further! This guide lists the various ways to do so without affecting your files and documents. 

How do I remove the shortcut virus from USB? 

Note icon NOTE
Keep your USB drive connected to the PC when performing the following workarounds.ย 

1. Format the USB drive 

  1. Launch the Windows + E shortcut to launch the File Explorer. 
  2. Click This PC located on the left sidebar to view all the available drives. 
  3. Right-click your removable USB drive and select the Format option from the context menu. USB shortcut virus
  4. On the pop-up that appears, set NTFS (Default) in the file system drop-down, enable the checkbox next to Quick Format to get quick formatting results, and press the Start button. USB shortcut virus
  5. Press Yes on the confirmation popup to initiate the USB format process for removing the USB shortcut virus. 
  6. After the format Complete prompt appears, remove the USB drive and insert it again, the shortcut virus wonโ€™t be present. 

Formatting the USB drive is the most straightforward way to delete the shortcut virus from a USB drive. However, the process is not entirely successful in every attempt. 

2. Execute the CMD command 

  1. Press the Windows key to launch the Start menu, type cmd in the search bar on top and choose the Run as administrator option. USB shortcut virus
  2. Click the Yes button on the User Action Control prompt that appears. 
  3. Type the following command and hit the Enter key. Replace H with the letter denoting your USB drive or pen drive. H:
  4. Next, type or paste the following command and hit Enter. del autorun.inf USB Shortcut Virus
  5. Finally, paste the following command and press Enter to execute it. Remember to replace H with the USD drive letter. attrib -h - r -s /s /d H:\*.* usb shortcut virus
  6. If the above commands do not work, it may be because the USB is infected with another virus. To delete the suspicious shortcut virus, try replacing autorun.inf with *.exe in the next attempt.

After the shortcut virus is deleted, format your USB drive once to get rid of the hidden files generated after executing the attrib command. 

3. Delete suspicious processes and keys 

3.1 Via Task Manager 

  1. Right-click the Windows icon on the taskbar and click the Task Manager option. 
  2. Locate and right the processes like wscript.exe or wscript.vbs and select End Task option from the context menu. 
  3. Next, switch to the Startup apps tab and look for suspicious programs with .EXE or .VBS extension. Right-click each of them and select Disable option from the context menu. usb shortcut virus
  4. Now exit the Task Manager window and see if the virus shortcut disappears. 

3.2 Edit the registry 

Note icon NOTE
Back up your Windows registry before proceeding and execute the below steps only if you have enough experience with the registry editor to avoid interfering with the registry keys.ย 
  1. Use the Windows + R shortcut to launch the Run dialog box, type the following command in the text box and press Enter. regedit 
  2. Paste the following address in the top address bar to directly access the Run key. HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Run
  3. Here, look for strange keys such as OUzzckky in the right section, and if you find any, right-click them and choose Deleteusb shortcut virus
  4. After deleting the keys, close the registry editor window and choose restart. 

3.3 Delete the temporary folder 

  1. Bring up the Run dialog box using the Windows + R shortcut key. Type the following command in the text box and hit OK to access the temporary folder of your user account. %temp%
  2. Use the Windows + A shortcut to select everything here and hit the Delete button to delete them. 
  3. Deleting the suspicious registry keys, background processes, and temporary files should help delete the shortcut virus in the USB as well as other drivers. 

4. Execute the BAT File

  1. Right-click the blank space on the desktop, choose New from the context menu followed by Text document from the sub-menu. 
  2. Right-click the new text document and select Open
  3. Copy & paste the following code into the text file and replace G with the letter representing your USB drive. 
    • @echo off
      del *.lnk
      attrib -s -r -h G:\*.* /s /d /l
      @echo complete
  4. Click File on the top menu and select Save as option from the drop-down menu. 
  5. Keep a meaningful file name and add the .bat file extension. Change the Save as type to All files and press Save
  6. Now exit the notepad window and double-click it on the desktop to execute it. 
  7. After the bat file runs successfully, check your USB drive. The USB shortcut virus will be deleted for good. 

Executing the above commands in a BAT file is the most effective way to remove the shortcut virus from the USD drive without deleting your stored data. 

Thatโ€™s all about it! Hopefully, you could permanently delete the shortcut virus by implementing the methods discussed in this guide. 

Before you leave, you may be interested in the guide explaining ways to fix the USB drive not recognized issue if it bothers you frequently. 

In case you need further assistance, we are just a comment away! 

More about the topics: USB issues