建议用for循环来遍历盘符,比如:
@echo off
set AllDrive=c d e f g h i j k l m n o p q r s t u v w x y z
for %%a in (%AllDrive%) do (
  attrib %%a:\autorun.inf -r -h -s -a
  del %%a:\autorun.inf
  md %%a:\autorun.inf
  md %%a:\autorun.inf\lszf..\
  del /f /s /q %%a:\RECYCLER\*.*
  )
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoDriveTypeAutoRun /t reg_dword /d 255 /f