如何从 USB 闪存驱动器中删除快捷方式病毒

如何从 USB 闪存驱动器中删除快捷方式病毒

我的 usb-falsh-drive 有每个文件夹的快捷方式,即使我删除了它们,它们仍然保持不变。有人遇到过这种情况吗?如何删除或防止它?

提前致谢,Vicky

答案1

格式化会删除数据和病毒。如果您比较担心,可以删除现有分区并重新创建,然后格式化。

答案2

尝试一下我的 USB 快捷方式病毒修复批处理文件:

@echo off & title USB Virus Fixer & color 0a & setlocal EnableDelayedExpansion
::****************************************************************
openfiles >nul 2>&1 & if %errorlevel% EQU 1 (
  setlocal disableDelayedExpansion & color 4f
  echo Running Admin Shell, Please wait.... & ping localhost -n 1 >nul
  set "bPath=%~f0" & setlocal enableDelayedExpansion 
  echo Dim UAC : Set UAC = CreateObject^("Shell.Application"^) >Elevate.vbs
  echo For Each strArg in Wscript.Arguments >>Elevate.vbs
  echo   args = args ^& strArg ^& " " >>Elevate.vbs
  echo Next >>Elevate.vbs
  echo UAC.ShellExecute "!bPath!",args,"","runas",1 >>Elevate.vbs
  echo Set objShell = Nothing >>Elevate.vbs
  cscript //nologo Elevate.vbs & del Elevate.vbs & exit /b
)
::****************************************************************
if not exist "%userprofile%\desktop\%~n0.lnk" (
  (
  echo Call Shortcut("%~f0","USB Virus Fixer"^)
  echo Sub Shortcut(Application,Name^)
  echo    Dim objShell,DesktopPath,objShortCut,MyTab
  echo    Set objShell = CreateObject("WScript.Shell"^)
  echo    MyTab = Split(Application,"\"^)
  echo    If Name = "" Then
  echo      Name = MyTab(UBound(MyTab^)^)
  echo    End if
  echo    DesktopPath = objShell.SpecialFolders("Desktop"^)
  echo    Set objShortCut = objShell.CreateShortcut(DesktopPath ^& "\" ^& Name ^& ".lnk"^)
  echo    objShortCut.TargetPath = Chr(34^) ^& Application ^& Chr(34^)
  echo    ObjShortCut.IconLocation = "shell32.dll,26"
  echo    objShortCut.Save
  echo End Sub
  ) >>crshort.vbs
  cscript //nologo crshort.vbs & del crshort.vbs
)
::**************************************************************
:top
mode 160,40 & cls
wmic logicaldisk where "DriveType=2" 2>f.txt >nul
set /p err=<f.txt
if "%err%"=="No Instance(s) Available." goto :No_USB
for /f "tokens=2 delims==" %%a in ('wmic logicaldisk where "DriveType=2" get Caption /format:list') do set "usb=%%a"
if exist %usb% goto :USB_Before_Fix 
::**************************************************************
:USB_Before_Fix
cls & echo. & echo.
echo                          #######################################################################
echo                                     Your USB key is mounted, connected as %usb%
echo                          #######################################################################
echo.
pause >nul | echo Press any key to start fixing the USB drive.....
::**************************************************************
::USB_Fix 
cls & echo. & echo.
echo Applying Shortcut Virus Fix.....
del /f /q /s %usb%\*.lnk
attrib -a -s -h -r /s /d %usb%\*.*
ping localhost -n 2 >nul 2>&1
echo Removing suspicious virus files.....
for %%a in (ntde1ect.com semo2x.exe avpo.exe ntdelect.com ntdeiect.com amvo.exe rtlip.exe x.exe ert.dll help.exe copy.exe hello.vbs hello.wsf debug) do (
  if exist "%usb%\%%~a" (
    attrib -s -h -r "%usb%\%%~a"
    del /f /q /s "%usb%\%%~a"
  )
)
ping localhost -n 2 >nul 2>&1
::**************************************************************
::USB_After_Fix
cls & echo. & echo.
echo                          #######################################################################
echo                                        Fixing the USB drive (%usb%) was successful
echo                          #######################################################################  
echo.
explorer "%usb%"
pause >nul | echo Press any key to quit.....
exit /b 0
::**************************************************************
:No_USB
del /f /q f.txt
cls & color 0c & echo. & echo.
echo                          #######################################################################
echo                                        Your usb key is not detected, please check
echo                          #######################################################################    
echo.
pause >nul | echo Press any key to Re-Check (Alt+F4/Close button to exit)     
goto :top

它可以自动检测 USB 驱动器并启动操作。

相关内容