- 帖子
- 3
- 积分
- 175
- 技术
- 0
- 捐助
- 0
- 注册时间
- 2009-2-10
|
下面是我在网上找的批处理 U盘防火墙+杀毒软件 可能是我不会用吧!安装了后就不会解除了!连格式化都有问题!
我还是把代码贴出来吧!
@echo off
title U盘安全摸板让你的U盘永里的数据永远不会被病毒感染
mode con: cols=85 lines=25
cls
color 9f
set tm1=%time:~0,2%
set tm2=%time:~3,2%
set tm3=%time:~6,2%
cls
echo 系统版本号: v1.0.3
echo.
echo.
ECHO 系统当前时间:%date% %tm1%点%tm2%分%tm3%秒
echo. ╔═══════════════════════════════════════╗
echo ║ 声明 ║
echo. ║ 本程序为U盘打造一个安全的储存和自动化的安装环境. ║
echo. ║ ║
echo. ║ 我会定时对次版本更新,使其更加完善。 ║
echo. ║ ║
echo. ║ 有什么不足的地方请大家提出来。 ║
echo. ║ ║
echo. ║ ║
echo. ║ ║
echo. ║ 我们还很年轻,离不开你们的支持! ║
echo. ║ ║
echo ║ ║
echo ╚═══════════════════════════════════════╝
pause
title U盘安全摸板让你的U盘永里的数据永远不会被病毒感染 QQ:63420978
@rem 本程序会转换U盘格式为NTFS
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 fsutil fsinfo drivetype %%i: >>drv.txt
find "移动" drv.txt >drive.txt
for /f "skip=2 tokens=1 delims=:" %%q in (drive.txt) do (echo y|convert %%q: /fs:ntfs
md %%q:\ADD&md %%q:\CON\&echo 纪录一些重要的事件>%%q:\Event.txt
echo [.ShellClassInfo] >%%q:\ADD\desktop.ini
echo IconFile=^%%SystemRoot^%%\system32\SHELL32.dll >>%%q:\ADD\desktop.ini
echo IconIndex=8 >>%%q:\ADD\desktop.ini
echo Infotip= >>%%q:\ADD\desktop.ini
echo ConfirmFileOp=0 >>%%q:\ADD\desktop.ini
echo set ws=wscript.createobject^(^"wscript.shell^"^) >%%q:\Auto.vbs
echo ws.run ^"Auto.cmd /start^",0 >>%%q:\Auto.vbs
echo @echo off >%%q:\AutoMation.cmd
echo mode con cols=55 lines=7 >>%%q:\AutoMation.cmd
echo echo 一件复制所需内容 >>%%q:\AutoMation.cmd
echo echo 1:system 2:softwre 3:game 4:backup >>%%q:\AutoMation.cmd
echo echo 全部复制到桌面 >>%%q:\AutoMation.cmd
echo set /p auto= 请选择 : >>%%q:\AutoMation.cmd
echo if ^"^%%auto^%%^"==^"1^" goto 1 >>%%q:\AutoMation.cmd
echo if ^"^%%auto^%%^"==^"2^" goto 2 >>%%q:\AutoMation.cmd
echo if ^"^%%auto^%%^"==^"3^" goto 3 >>%%q:\AutoMation.cmd
echo if ^"^%%auto^%%^"==^"4^" goto 4 >>%%q:\AutoMation.cmd
echo :1 >>%%q:\AutoMation.cmd
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 fsutil fsinfo drivetype ^%%%%i:^| find ^"移动^" ^&^& copy ^%%%%i:\sec..\system ^"%%userprofile^%%\桌面^" >>%%q:\AutoMation.cmd
echo exit >>%%q:\AutoMation.cmd
echo :2 >>%%q:\AutoMation.cmd
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 fsutil fsinfo drivetype ^%%%%i:^| find ^"移动^" ^&^& copy ^%%%%i:\sec..\software ^"%%userprofile^%%\桌面^" >>%%q:\AutoMation.cmd
echo exit >>%%q:\AutoMation.cmd
echo :3 >>%%q:\AutoMation.cmd
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 fsutil fsinfo drivetype ^%%%%i:^| find ^"移动^" ^&^& copy ^%%%%i:\sec..\game ^"%%userprofile^%%\桌面^" >>%%q:\AutoMation.cmd
echo exit >>%%q:\AutoMation.cmd
echo :4 >>%%q:\AutoMation.cmd
echo md ^"%userprofile%\桌面\BackUp^" >>%%q:\AutoMation.cmd
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 fsutil fsinfo drivetype ^%%%%i:^| find ^"移动^" ^&^& copy ^%%%%i:\sec..\backup ^"%%userprofile^%%\桌面\backup^" >>%%q:\AutoMation.cmd
echo exit >>%%q:\AutoMation.cmd
del /f /s drv.txt & DEL /F /S DRIVE.TXT
echo @echo off >%%q:\Auto.cmd
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 fsutil fsinfo drivetype ^%%%%^i:^| find ^"移动^" ^&^& start ^%%%%i:\sec..\ ^&^&taskkill /f /im cmd.exe >>%%q:\Auto.cmd
echo exit >>%%q:\Auto.cmd
echo ^[AutoRun^] >%%q:\AutoRun.inf
echo icon=o.ico >>%%q:\AUtoRun.inf
md %%q:\sec..\
md %%q:\sec
md %%q:\sec\defend..\
md %%q:\sec..\System
md %%q:\sec..\Software
md %%q:\sec..\Game
md %%q:\sec..\BackUp
attrib +a +r +s +h %%q:\sec
attrib +h %%q:\autorun.inf
attrib +h %%q:\auto.cmd
attrib +h %%q:\add\desktop.ini
echo Y|cacls %%q:\sec /p everyone:r
echo Y|cacls %%q: /p everyone:r
echo y|cacls %%q:\autorun.inf /p everyone:r
echo y|cacls %%q:\automation.cmd /p everyone:r
echo y|cacls %%q:\auto.vbs /p everyone:r
echo y|cacls %%q:\auto.cmd /p everyone:r
) |
|