这是我写的一个批处理,一样的效果,遍历所有盘符,呵呵
@echo off
for %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do call [s:3]isabledAutoRun %%i
goto End
[s:3]isabledAutoRun
del %1:\\XXXXXXXXXXf /a /f /q
rd %1:\\XXXXXXXXXXf /s /q
mkdir %1:\\XXXXXXXXXXf
mkdir %1:\\XXXXXXXXXXf\\abc..\\
attrib %1:\\XXXXXXXXXXf +h +r
goto :EOF
:End
Taskkill /f /im explorer.exe
pushd %Windir%
start "启动EXPLORER" %windir%\\explorer.exe
保存成.cmd就行了