[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[代码合集] 感谢批处理之家,发下我自己大部分源码

  1. @echo off&Mode con cols=72 lines=23&color e&cd /d %~dp0&set batname=批处理单文件制装及其他功能
  2. ::tool(1以外no)查tool权限,short(1以外no)开始菜单快捷,right启动权限(0非1要),au3启动框窗宽度,cho延时秒,fbb选择框默认,:bp为保存,:dp为临时位置
  3. set dp=%temp%\Amay&set "bpq=D:\AppSave"&set "fbb=D:\AppSoft"&set /a au3=100&set cho=30&set tool=1&set short=1&set right=1
  4. if "%short%" equ "1" %~dp0Todo\shortcut.exe /f:"%AppData%\Microsoft\Windows\Start Menu\Programs\MayTools.lnk" /a:c /t:"%~dp0MayTools.bat"
  5. set "bp=%bpq%"&rd /s/q %dp%&md %dp%&md %dp%\file&md %dp%\st&set "fb=%fbb%"&cls&if "%right%" equ "0" call :soft
  6. %1 %2
  7. cls&ver|find "5.">nul&&call :soft||mshta vbscript:createobject("shell.application").shellexecute("%~s0","call :soft","","runas",1)(window.close)&goto :eof
  8. :soft
  9. title %batname%    by Lovemay ^>^> yunyan100
  10. (if not exist C:\Setting set "fb=%fbb%"&set "bp=%bpq%"&set "dik=no"&call :sett) >nul 2>nul
  11. set bp=<nul&set fb=<nul&for /f "tokens=1-2 delims==" %%a in (C:\Setting) do (if "%%a"=="Save" set "bp=%%b"
  12. if "%%a"=="Soft" set "fb=%%b"
  13. if "%%a"=="Auto" set "dik=%%b") >nul 2>nul
  14. call :sett&if not exist %fb% md %fb%&if not exist %bp% md %bp%
  15. cls&(setlocal disabledelayedexpansion&md %dp%&md %dp%\file&md %dp%\st) >nul 2>nul
  16. for %%a in (start pa bit runexe64 src dst str batnsi paa pax pay pat pan biy fve ave png ss) do set %%a=<nul
  17. echo.&echo      ★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
  18. echo      ☆                                                          ☆
  19. echo      ★                %batname%                ★
  20. echo      ☆                                                          ☆
  21. echo      ★         W.一条龙打包.Exe        1.MayTools多功能         ★
  22. echo      ☆         E.重置后打包.Exe        2.Window系统工具         ☆
  23. echo      ★         G.NSIS  打包.Exe        3.Reg转为Bat/Nsi         ★
  24. echo      ☆         R.7-Zip 打包.Exe        4.提取ExeIco图标         ☆
  25. echo      ★         F.WinRar打包.Exe        5.文件信息表.Exe         ★
  26. echo      ☆         T.设置权限为.Exe        6.批量压缩文件夹         ☆
  27. echo      ★         D.多程序打包.Exe        7.文件命名及归档         ★
  28. echo      ☆         A.配置文件之处理        8.批量建空值文件         ☆
  29. echo      ★         S.文件及其他处理        9.Chm 文件反编译         ★
  30. echo      ☆         Q.文件及其他查看        0.清理系统(隐形)         ☆
  31. echo      ★                                                          ★
  32. echo      ☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆                 
  33. if not "%ercr%"=="" (echo.                              %ercr%)else (echo.                今天:%date:~0,4%年%date:~5,2%月%date:~8,2%日  时间:%time:~0,5%  星期:%date:~-1,1%)
  34. echo ________________________________________________________________________                  
  35. choice /c 1234567890wegrftdasqz /n /m "请选择菜单序号:" /t 6 /d z
  36. if %errorlevel%==21 ( set ercr=<nul&goto :soft)else ( set ercr=<nul&set start=%errorlevel%)
  37. if /i "%start%"=="11" ( call :ofile
  38. )else (if /i "%start%"=="12" ( call :patty&set fve=:soft&call :bty
  39. )else (if /i "%start%"=="13" ( call :patty&call :nsis
  40. )else (if /i "%start%"=="14" ( call :patty&call :7zinf
  41. )else (if /i "%start%"=="15" ( call :patty&call :winrar
  42. )else (if /i "%start%"=="16" ( call :patty&call :de :soft&call :soft
  43. )else (if /i "%start%"=="17" ( call :patty&set ave=:soft&call :exeau3
  44. )else (if /i "%start%"=="18" ( call :patty&call :exetxt
  45. )else (if /i "%start%"=="19" ( call :fold
  46. )else (if /i "%start%"=="20" ( call :ffname
  47. )else (if /i "%start%"=="1" ( call :back
  48. )else (if /i "%start%"=="2" ( call :bbs
  49. )else (if /i "%start%"=="3" ( call :vbr
  50. )else (if /i "%start%"=="4" ( call :exeico
  51. )else (if /i "%start%"=="5" ( start %~dp0info.exe&goto :soft
  52. )else (if /i "%start%"=="6" ( call :yasuo
  53. )else (if /i "%start%"=="7" ( call :cfile
  54. )else (if /i "%start%"=="8" ( call :onlysoft
  55. )else (if /i "%start%"=="9" ( call :bchm
  56. )else (if /i "%start%"=="10" ( call :cleaner))))))))))))))))))))
  57. :ofile
  58. ::原文件(夹)路径设置,bty单独32位或64位,或分32位和64位,:exeau3运行多程序
  59. rd /s/q %dp%\file\temp&del /f/s/q/a %dp%\file\temp&md %dp%\file\temp\&del /f/s/q/a %dp%\st&set fve=:ofile&set ppa=AppData&cls
  60. call :callnn 选择文件(夹) :soft 0 a n exe\bat 77 88
  61. dir/ad "%pa%" >nul 2>nul&&set patt=%pa%&&set payy=%pa%||xcopy /y "%pa%" "%dp%\file\temp" >nul 2>nul&&set patt=%dp%\file\temp
  62. :bty
  63. if exist "%patt%\To%name%.exe" del /f/q/s/a "%patt%\To%name%.exe"
  64. call :callnn 运行程序配置 %fve% 2 1 n n 77 88 仅32或64位.Exe 含32和64位.Exe 多程序打包.Exe
  65. if "%pa%" equ "3" (set ave=:bty&call :exeau3)else (if "%pa%" equ "1" (set bit=%pa%&set tname=启动运行程序)else (set bit=%pa%&set tname=32位运行程序))
  66. if /i "%start%"=="12" (for /f "delims=" %%a in ('dir /b /a-d /s %payy%\*.exe %payy%\*.bat') do set "patt=%%~dpa"&goto :btyy) 2>nul
  67. :btyy
  68. if "%patt:~-1%" equ "\" set "patt=%patt:~,-1%"
  69. call :callnn %tname% :bty 1 1 n exe\bat 77 88
  70. call :ltty
  71. set runexe=%pa%&set pao=%pax%&set name=%pax%&if exist %dp%\st\exfile.au3 del /f/s/q/a %dp%\st\exfile.au3
  72. if /i "%bit%" equ "1" goto :fileiic
  73. call :callnn 64位运行程序 :bty 1 1 n exe\bat 77 88
  74. call :ltty
  75. set runexe64=%pa%&goto :fileiic
  76. :exeau3
  77. set /a num=0&call :callnn 多程序打包.Exe %ave% 2 1 n n 77 88 有.au3重置程序 无.au3制作程序 设置默认改宽度
  78. if "%pa%" equ "1" (if exist %dp%\st\exfile.au3 (call %~dp0au3\aut2exe.exe  /in "%dp%\st\exfile.au3" /out "%patt%\Do%pao%.exe" /nopack /icon "%dp%\st\0.ico" /comp 4&&goto :soft)else (set "ercr=无exfile,未生成"&goto :soft))else (if "%pa%" equ "2" (set pa=<nul&set au55=<nul&goto :au3)else (set au3=<nul&set /p au3="请设置宽度,当前%au3%:"&set pa=<nul&goto :au3))
  79. :au3m
  80. if /i "%start%" neq "11" (set "ercr=多Exe制作成功"&call :info&goto :soft)else (goto :fileiic)
  81. :fileiic
  82. ::获取版本信息,程序权限配置
  83. call :callnn 获取版本信息 :btyy 1 1 n exe\bat 77 88
  84. call %~dp0info.exe "%pa%" "%dp%\st\0.ico" 3
  85. call %~dp0info.exe "%pa%" "%dp%\st\info.ini" 1
  86. if not exist "%dp%\st\0.ico" copy "%~dp0Todo\0.ico" "%dp%\st\0.ico" >nul 2>nul
  87. :exeiif
  88. call :info&&call :de :fileiic
  89. :package
  90. ::下面为封装方式选择
  91. call :callnn 选择打包.Exe :exeiif 2 1 n n 77 88 选择NSIS打包.Exe 选择7-Zip打包.Exe 选择WinRar打包.Exe
  92. if /i "%pa%" equ "1" (call :nsis)else (if /i "%pa%" equ "2" ( call :7zinf)else ( call :winrar))
  93. :nsis
  94. if exist "%patt%\To%name%.exe" del /f/q/s/a "%patt%\To%name%.exe"
  95. cls&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.                            正在制作中......
  96. call mshta vbscript:createobject("wscript.shell").run("%~dp0Todo\nsis\makensis.exe /v2 %dp%\st\Nsis.nsi",0)(window.close)
  97. set "ercr=NSIS制作成功"&goto :soft
  98. :7zinf
  99. if not exist "%patt%\To%name%.exe" copy /y %dp%\st\To%pao% "%patt%\To%name%.exe"
  100. call %~dp0info.exe "%dp%\st\0.ico" "%~dp0Todo\7z\7x86.sfx" "%dp%\file\tmp"
  101. cls&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.                            正在制作中......
  102. call %~dp0Todo\7z\7z.exe a -mx=9 -m0=LZMA2 -mf=BCJ2 "%dp%\file\tmp.7z" "%patt%\*" >nul 2>nul
  103. call copy /b "%dp%\file\tmp" + %dp%\st\ini.txt + "%dp%\file\tmp.7z" "%bp%\%name%.exe"
  104. cls&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.                            正在制作中......
  105. call %~dp0info.exe "%bp%\%name%.exe" "%dp%\st\info.ini" 2
  106. del /f/s/q/a "%dp%\file\tmp.*"&set "ercr=7zip制作成功"&goto :soft
  107. :winrar
  108. if not exist "%patt%\To%name%.exe" copy /y %dp%\st\To%pao% "%patt%\To%name%.exe"
  109. if exist "%bp%\%name%.exe" del /f/s/q/a "%bp%\%name%.exe"
  110. cls&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.                            正在制作中......
  111. call %~dp0Todo\Rar\Winr.exe a -m5 -s -r -ibck -sfx -o+ -z%dp%\st\win.txt %winadmin% -iicon%dp%\st\0.ico "%bp%\%name%.exe" -ep1 "%patt%\"
  112. call %~dp0info.exe "%bp%\%name%.exe" "%dp%\st\info.ini" 2
  113. set "ercr=Win制作成功"&goto :soft
  114. :de
  115. ::对启动程序权限配置
  116. call :callnn 设置权限为.Exe %1 2 2 n n 77 88 清除管理员权限 添加管理员权限
  117. (if "%pa%" equ "1" (if exist "%dp%\st\exfile.au3" findstr /v "#RequireAdmin" "%dp%\st\exfile.au3">%dp%\st\#&&move %dp%\st\# %dp%\st\exfile.au3&&start %~dp0au3\aut2exe.exe  /in "%dp%\st\exfile.au3" /out "%patt%\Do%pao%.exe" /nopack /icon "%dp%\st\0.ico" /comp 4
  118. findstr /v "RequestExecutionLevel user" "%dp%\st\Nsis.nsi">%dp%\st\#&echo RequestExecutionLevel user >%dp%\st\Nsis.nsi&&type %dp%\st\# >>%dp%\st\Nsis.nsi&findstr /v "MiscFlags" "%dp%\st\ini.txt">%dp%\st\#&&move %dp%\st\# %dp%\st\ini.txt&set winadmin=<nul)else (if exist "%dp%\st\exfile.au3" findstr /v "#RequireAdmin" "%dp%\st\exfile.au3">%dp%\st\#&&echo #RequireAdmin>%dp%\st\exfile.au3&&type %dp%\st\# >>%dp%\st\exfile.au3&&start %~dp0au3\aut2exe.exe  /in "%dp%\st\exfile.au3" /out "%patt%\Do%pao%.exe" /nopack /icon "%dp%\st\0.ico" /comp 4
  119. findstr /v "RequestExecutionLevel user" "%dp%\st\Nsis.nsi">%dp%\st\#&move %dp%\st\# %dp%\st\Nsis.nsi&set "winadmin=-iadm"&findstr /v "UTF-8" "%dp%\st\ini.txt">%dp%\st\#&echo ;!@Install@!UTF-8!>"%dp%\st\ini.txt"&&echo MiscFlags="4">>"%dp%\st\ini.txt"&type %dp%\st\#>>%dp%\st\ini.txt))&del /f/s/q/a %dp%\st\#&if "%pa%" equ "1" (set "ercr=清除权限成功"&goto :eof)else (set "ercr=添加权限成功"&goto :eof)
  120. :exetxt
  121. ::一些需要调用的配置文件
  122. call :callnn 配置文件之处理 :soft 2 0 n n 77 88 文件Nisi 文件7zSFX 文件WinRar 文件Exfile 文件ToRun 文件info EXE释放位置
  123. (if /i "%pa%"=="1" ( start %~dp0nopad.exe %dp%\st\Nsis.nsi)else (if /i "%pa%"=="2" (start %~dp0nopad.exe %dp%\st\ini.txt)else (if /i "%pa%"=="3" (start %~dp0nopad.exe %dp%\st\win.txt)else (if /i "%pa%"=="4" (start %~dp0nopad.exe %dp%\st\exfile.au3)else (if /i "%pa%"=="5" (call %~dp0nopad.exe %dp%\st\ToRun.nsi&del /f/s/q/a "%patt%\To%name%.exe"&call %~dp0Todo\nsis\makensis.exe /v2 "%dp%\st\ToRun.nsi")else (if /i "%pa%"=="6" (call %~dp0nopad.exe %dp%\st\info.ini&call :info)else (goto :fiv)))))))&goto :soft
  124. :fiv
  125. call :callnn EXE释放位置 :exetxt 2 0 n n 77 88 释放到Windir 释放到Program 释放到AppData 释放到Temp
  126. (if "%pa%"=="1" (set ppa=Windir&call :info&call :de :fiv)else (if "%pa%"=="2" (set ppa=ProgramFiles&call :info&call :de :fiv)else (if "%pa%"=="3" (set ppa=AppData&call :info&call :de :fiv)else (set ppa=Temp&call :info&call :de :fiv))))&goto :exetxt
  127. :ffname
  128. ::查看文件夹
  129. call :callnn 文件及其他查看 :soft 2 0 n n 77 88 打开Soft 打开Save 打开Temp 清空内容 本人专用1 本人专用2 本人专用3
  130. (if /i "%pa%"=="1" (start "" "%fb%")else (if /i "%pa%"=="2" (start "" "%bp%")else (if /i "%pa%"=="3" (start "" "%dp%\st")else (if /i "%pa%"=="4" (set patt=<nul&set pa=<nul)else (if /i "%pa%"=="5" (if "%tool%" equ "1" (start %~dp0nopad.exe %~dp0MayTools.bat)else (set "ercr=无权限查看"))else (if /i "%pa%"=="6" (if "%tool%" equ "1" (start %~dp0nopad.exe "C:\Setting")else (set "ercr=无权限查看"))else (if "%tool%" equ "1" (start "" "%~dp0")else (set "ercr=无权限查看"))))))))&goto :soft
  131. :fold
  132. ::处理原文件路径
  133. echo On Error Resume Next>%dp%\1.vbs
  134. echo WSH.echo CreateObject("Shell.Application").BrowseForFolder(0,"请选择文件夹",256,0).Self.Path>>%dp%\1.vbs
  135. call :callnn 文件及其他处理 :soft 2 0 n n 77 88 Soft修改 Save修改 全部还原 Soft动态 Soft固定 Soft切换 删除文件
  136. (if "%pa%" equ "1" ((echo.&echo 调用文件夹:%fb%&for /f "delims=" %%i in ('cscript //nologo %dp%\1.vbs') do set "fb=%%i")&call :sett)else (if "%pa%" equ "2" ((echo.&echo 保存文件夹:%bp%&for /f "delims=" %%i in ('cscript //nologo %dp%\1.vbs') do set bp=%%i)&call :sett)else (if "%pa%" equ "3" (set "fb=%fbb%"&md %fb% >nul 2>nul&set "bp=%bpq%"&md %bp% >nul 2>nul&set "dik=no"&call :sett)else (if "%pa%" equ "4" (set "dik=ok"&call :sett)else (if "%pa%" equ "5" (set "dik=no"&call :sett)else (if "%pa%" equ "6" (goto :foldd)else (set patt=<nul&set pa=<nul&goto :delyy)))))))&goto :fold
  137. :foldd
  138. call :callnn 文件路径修改 :fold 4 0 n n 77 88
  139. (dir/ad "%pa%" >nul 2>nul&&set "patt=%pa%"&&set "payy=%pa%"||del /f/s/q/a %dp%\file\temp&&xcopy /y "%pa%" "%dp%\file\temp" >nul 2>nul&&set payy=%dp%\file\temp)&call :fold
  140. :delyy
  141. call :callnn 清除成内容 :fold 2 1 n n 77 88 全部删除 选择删除
  142. if "%pa%"=="2" call :callnn 清除成内容 :delyy 3 0 n n 77 88
  143. if "%pa%"=="1" (set "clea=for /f "delims=" %%a in (%dp%\Dell.txt) do echo;%%a")else (set clea=echo;"%pa%")
  144. cls&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.                            正在删除中......
  145. %clea%|mshta "javascript:new ActiveXObject('Shell.Application').NameSpace(10).MoveHere(new ActiveXObject('Scripting.FileSystemObject').GetStandardStream(0).readline().split('"')[1]);close()"
  146. (if "%pa%"=="1" (del /f/s/q/a %dp%\Dell.txt)else ( findstr /v /c:"\"%pa%\"" %dp%\Dell.txt>%dp%\#&move %dp%\# %dp%\Dell.txt))&goto :soft
  147. :callnn
  148. ::此处为公共调用,%1标题名,%2上级名,%3(0路径设置,1文件表,2菜单表,3删除表),%4(a调用文件,b手动文件,n选择框,m输入框,1-90znm),%5(n不,1检查数字,f检查文件夹),%6(n文件夹,exe\bat),%7,%8临时输入名称,%9-%17临时菜单名,call :callnn 复制封装文件 :soft 0123 ab1-9nm n1f nexe 77 88 9个多量,(set png=1也有这个)
  149. set aa=%1&set bb=%2&set cc=%3&set dd=%4&set ee=%5&set ff=%6&set gg=%7&set hh=%8&set ii=%9
  150. shift /0&shift /1&shift /2&shift /3&shift /4
  151. set jj=%5&set kk=%6&set ll=%7&set mm=%8&set nn=%9
  152. shift /5&shift /6&shift /7
  153. set oo=%7&set pp=%8&set qq=%9
  154. for /f "delims=\ tokens=1-3" %%a in ("%ff%") do (set ff=%%a&if "%%b" neq "" set ff=%%a %%b&if "%%c" neq "" set ff=%%a %%b %%c)
  155. set "dff=*.%ff: =|*.%"&set "aff=*.%ff: = *.%"
  156. set fd=%fb%\&set pat=%patt%&set err=<nul&call :list&setlocal disabledelayedexpansion&goto :eof
  157. :list
  158. if exist %dp%\st\exe.txt del /s/q %dp%\st\exe.txt
  159. cls&echo.&echo.                %batname% - %aa%
  160. if /i "%cc%" neq "0" goto :listy
  161. echo.&echo.                             %err%
  162. if /i "%hh%" neq "88" (set hh=%hh%) else (set hh=请拖入文件\夹路径)
  163. dir/ad "%fb%" >nul 2>nul||set "fd=%fbb%\"
  164. if /i "%dd%" equ "a" (dir/ad "%fd%" >nul 2>nul&&(for /f "delims=" %%a in ('%~dp0Release\expl.exe "%fd:~,-1%" "%dff%"') do set pa=%%a)||(for /f "delims=" %%a in ('%~dp0Release\expl.exe "%fd:~,-2%" "%dff%"') do set "pa=%%a"))else (if /i "%dd%" equ "b" (set pa=<nul&set /p "pa=%hh%(0主菜单,z上级):")else (set pa=<nul))
  165. set "pve=%pa%"&if not exist "%pa%" set "ercr=无选择或空值"&goto %bb%
  166. if /i "%pa%" equ "0" (goto :soft)else (if /i "%pa%" equ "z" (call %bb%)else (set "pa=%pa:"=%"))
  167. dir/ad "%pa%" >nul 2>nul&&set "pac=%pa%"&&set bv=0||for /f "delims=" %%a in ("%pa%")do set "pac=%%~dpa"&set bv=1
  168. cd /d "%pac%" &if %bv%==0 cd.. >nul 2>nul
  169. if "%dik%"=="ok" set "fb=%cd%"&call :sett
  170. if /i "%ff%" equ "n" (set ff=n)else ((pushd "%pa%"&dir/s/b/a-d %aff%) >nul 2>nul||set pa=<nul&&set err=无"%dff%"文件&&goto :list)
  171. cd /d "%pa%" >nul 2>nul&dir/ad "%pa%" >nul 2>nul&&(pushd "%pa%"&for /f "delims=" %%a in ('dir /b /a-d /s %aff%') do set "pa=%%~dpa"&goto :uac) >nul 2>nul||(set "ss=1"&for /f "delims=" %%a in ("%pa%") do set "pa=%%~dpa"&set "paa=%%~nxa"&goto :uac) >nul 2>nul
  172. :uac
  173. if "%pa:~-1%" equ "\" set "pa=%pa:~,-1%"
  174. for %%a in ("%cd%") do echo %%a>>%dp%\1.txt
  175. dir/ad "%cd%\" >nul 2>nul&&cd..&&goto :uac
  176. for /f "delims=" %%a in (%dp%\1.txt) do (setlocal enabledelayedexpansion&for %%i in (%%a) do (set "pay=%%~nxi"
  177. set "pay=!pay:(=!"
  178. set "pay=!pay:)=!"
  179. ren %%i "!pay!" >nul 2>nul))&endlocal&del /f/s/q/a %dp%\1.txt >nul 2>nul
  180. set "pa=%pa:(=%"
  181. set "pa=%pa:)=%"
  182. if "%ss%"=="1" set "pa=%pa%\%paa%"
  183. if "%ss%"=="1" set "paa=%paa:(=%"
  184. if "%ss%"=="1" set "paa=%paa:)=%"
  185. if "%ss%"=="1" ren "%pa%" "%paa%"
  186. if "%ss%"=="1" set "pa=%pa:(=%"
  187. if "%ss%"=="1" set "pa=%pa:)=%"
  188. if /i "%ee%" equ "f" (dir/ad %pa% >nul 2>nul||set pa=<nul&&set "err=不是文件夹"&&goto :list)else (if "%ee%" equ "1" (echo %pa%|findstr /be "[0-9]*">nul 2>nul&&goto :eof||set err="不是数字"&goto :list)else (set ee=n))
  189. if "%png%"=="1" goto :eof
  190. for /f "delims=" %%a in (%dp%\Dell.txt) do (if /i "%pve%"==%%a goto :eof)
  191. echo "%pve%">>%dp%\Dell.txt&cls&goto :eof
  192. :listy
  193. ::列出选择项目
  194. set "pan=%pat:(=%"
  195. set "pan=%pan:)=%"
  196. (for %%a in ("%pan%") do set "paa=%%~nxa")2>nul
  197. ren "%pat%" "%paa%" 2>nul
  198. set "pat=%pan%"&setlocal enabledelayedexpansion&set n=0
  199. if /i "%cc%" equ "1" ((pushd "%pat%"&for /f "delims=" %%a in ('dir/b/a-d !aff!') do (set /a n%%=99,n=n+1&set nb=!n!&echo !n!^|%pat%\%%a>>%dp%\st\exe.txt&echo.                         !n!.%%~nxa&if !n!==20 echo.    按任意键进入下列表&pause>nul)& popd) 2>nul
  200. (for /f "tokens=*" %%a in ('dir/b/ad "%pat%\*"') do (set /a n=n+1&set nb=!n!&echo !n!^|%pat%\%%a>>%dp%\st\exe.txt&echo.                         !n!.%%~nxa&if !n!==20 echo.    按任意键进入下列菜单&pause>nul))2>nul
  201. if "!nb!" lss "1" set pat=%patt%&set err="没有支持文件"&goto :list
  202. )else (if /i "%cc%" equ "2" (for %%a in (%ii% %jj% %kk% %ll% %mm% %nn% %oo% %pp% %qq%) do (set /a n%%=99,n=n+1&set nb=!n!&echo !n!^|%%a>>%dp%\st\exe.txt&echo.                         !n!.%%~nxa))else ((for /f "delims=" %%a in (%dp%\Dell.txt) do (set /a n%%=99,n=n+1&set nb=!n!&echo !n!^|%%a>>%dp%\st\exe.txt&echo.                         !n!.%%~nxa)) 2>nul))
  203. :choices
  204. if not "%err%"=="" echo.&echo.                             %err%
  205. echo.&if /i "%cc%" equ "4" echo 当前路径是:%patt%&echo.
  206. set "fd=%patt%\"&choice /c 1234567890znm /n /m "请选择(0主菜单,Z返回,N选择框,M输入框)%cho%秒后自动:%dd%" /t %cho% /d %dd%&echo.
  207. if %errorlevel%==10 (set ercr=<nul&goto :soft)else (if %errorlevel%==11 (call %bb%)else (if %errorlevel%==12 (if "%cc%" neq "1" (endlocal&set pa=<nul&set err="不支持选择框"&goto :list)else ((for /f "delims=" %%a in ('%~dp0Release\expl.exe "%fd:~,-1%" "%dff%"') do endlocal&set pa=%%a&goto :eof)||endlocal&set pa=<nul&set err="没有选择路径"&&goto :list))else (if %errorlevel%==13 (set pa=<nul&set /p pa=请输入序号^(0主菜单,Z上级^):)else (set pa=%errorlevel%))))
  208. if /i "%pa%" equ "z" (call %bb%)else (if /i "%pa%" equ "0" (set ercr=<nul&goto :soft)else (if "%cc%" gtr "0" (findstr /b "%pa%" "%dp%\st\exe.txt"&&goto :chkk||endlocal&set pa=<nul&set err="非正常选择"&goto :list)else (goto :chkk)))
  209. :chkk
  210. if "%cc%" equ "2" (endlocal&set "pa=%pa%"&goto :eof)else (for /f "tokens=1-2 delims=|" %%a in ('findstr /b "%pa%|" %dp%\st\exe.txt') do endlocal&set "pa=%%b")
  211. if /i "%cc%" equ "1" dir/ad "%pa%" >nul 2>nul&&endlocal&&set pat=%pa%&&set err=<nul&&set nb=<nul&&goto :list
  212. set "pa=%pa:"=%"
  213. endlocal&set "pa=%pa%"&goto :eof
  214. ::下面为一些公共调用功能,patty判断变量patt值是否存在,ltty文件路径配置,sett为可路径
  215. :sett
  216. if not exist "%bp%" (if not exist "%fb%" (set "fb=%fbb%"&set "bp=%bpq%")else (set "bp=%bpq%"))else (if not exist "%fb%" (set "fb=%fbb%")else (o)) >nul 2>nul
  217. attrib -h -s -r C:\Setting&echo Save=%bp%>C:\Setting&echo Soft=%fb%>>C:\Setting&echo Auto=%dik%>>C:\Setting&attrib +h +s +r C:\Setting&goto :eof
  218. :patty
  219. if not defined patt set "ercr=无处理,重操作"&goto :soft
  220. dir/ad "%patt%" >nul 2>nul&&goto :eof||set "ercr=无处理,重操作"&goto :soft
  221. :ltty
  222. setlocal enabledelayedexpansion&set "src=%patt%\"&set "dst="&set "pax=<nul"&set "pay=<nul"
  223. (for /f "delims=" %%a in ("%pa%") do (set "str=%%a"&set "pax=%%~na"&set "pay=%%~nxa"&set "pa=!str:%src%=%dst%!"))2>nul
  224. endlocal&set "pax=%pax%"&set "pay=%pay%"&set "pa=%pa%"&goto :eof
  225. :back
  226. cls&echo.&echo.                 %batname% - MayTools多功能
  227. set "drives=D E F G H I J K L M N O P Q R S T U V W X Y Z"
  228. echo.&echo.   A.加右键权限 B.Bat\Txt加密  C.大小字母  D.检查磁盘    E.畸形删除  
  229. echo.&echo.   F.n次方的积  G.开n次方根    H.转二进制  I.转十六进制  J.转任意进制
  230. echo.&echo.   K.金额转换   L.加减乘除     M.文本比较  N.Bitlocker   O.快捷方式
  231. echo.&echo.   P.灵异事件   Q.    R.    S.    T.     
  232. ::echo.&echo.   X.    U.    V.    W.    Y.::echo.&echo.   Z.
  233. ::echo.&echo.   1.NSIS特殊      
  234. echo.&choice /c abcdefghijklmnopqrstuvwxyz8976543210 /n /m "请选择序号(0主菜单)%cho%秒后自动返回." /t %cho% /d 0
  235. set ercr=<nul&if %errorlevel%==36 goto :soft
  236. if %errorlevel%==35 call mshta vbscript:createobject("wscript.shell").run("%~dp0Todo\nsis2\makensis.exe /v2 %dp%\st\Nsis.nsi",0)(window.close)
  237. if %errorlevel%==1 call :admckk
  238. if %errorlevel%==2 goto :jiami
  239. if %errorlevel%==3 goto :main
  240. if %errorlevel%==4 goto :chkdisk
  241. if %errorlevel%==5 goto :delall
  242. if %errorlevel%==6 goto :chifang
  243. if %errorlevel%==7 goto :kai
  244. if %errorlevel%==8 goto :erzhi
  245. if %errorlevel%==9 goto :hex
  246. if %errorlevel%==10 goto :ashu
  247. if %errorlevel%==11 goto :test
  248. if %errorlevel%==12 goto :chu
  249. if %errorlevel%==13 start %~dp0wen.exe
  250. if %errorlevel%==14 goto :bitlock
  251. if %errorlevel%==15 goto :zho
  252. if %errorlevel%==16 goto :begin
  253. goto :back
  254. :zho
  255. call :callnn 快捷方式 :back 2 1 n n 77 88 快捷方式删掉 快捷方式还原
  256. (taskkill /f /im explorer.exe&attrib -s -r -h "%userprofile%\AppData\Local\iconcache.db"&del "%userprofile%\AppData\Local\iconcache.db" /f /q&if "%pa%"=="1" (reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer" /v "link" /t REG_BINARY /d "00000000" /f)else (reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer" /v "link" /t REG_BINARY /d "19000000" /f))&start explorer&goto :soft 2>nul
  257. :delall
  258. cls&echo.&echo.                   %batname% - 畸形删除
  259. call :callnn 畸形删除 :back 0 a n exe\dll 77 88
  260. DEL /F /S /A /Q \\?\"""%pa%""" >nul 2>nul
  261. RD /S /Q \\?\"""%pa%""" >nul 2>nul
  262. goto :back
  263. :chkdisk
  264. cls&echo.&echo.                   %batname% - 检查磁盘
  265. for %%a in (%drives%) do (for /f "tokens=1" %%i in ('fsutil fsinfo drivetype %%a:^|find "固定"^|^|fsutil fsinfo drivetype %%a:^|find "可移动"') do (echo.                                   %%i)) 2>nul
  266. echo.&choice /c abcdefghijklmnopqrstuvwxyz10 /n /m "请选择序号(0主菜单,1返回上级)%cho%秒后自动返回:" /t %cho% /d 0
  267. if %errorlevel%==28 (goto :soft)else (if %errorlevel%==27 (call :back)else (set sum=%errorlevel%))
  268. setlocal enabledelayedexpansion&set "str=1abcdefghijklmnopqrstuvwxyz"
  269. set/a r=%sum%%%27
  270. set sum=!str:~%r%,1!
  271. echo @echo off^&Mode con cols=72 lines=23^&color e>%dp%\chk.bat
  272. echo echo y^|chkdsk /r /x /f %sum%:>>%dp%\chk.bat
  273. start %dp%\chk.bat&goto :chkdisk
  274. :jiami
  275. set png=1&call :callnn Bat代码加密 :soft 0 a n bat\txt 77 88
  276. dir/ad "%pa%">nul 2>nul&&set "ercr=Bat不支持文件夹"&&goto :soft
  277. set ercr=<nul&cls&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.                                  正在加密中......
  278. echo %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a >"%dp%\e.tmp"
  279. type "%pa%">>"%dp%\e.tmp"&setlocal enabledelayedexpansion
  280. for %%a in ("%pa%") do (if not exist "%%~dpaback%%~nxa" ren "%pa%" "Back-%%~nxa"
  281. for %%i in ("%dp%\e.tmp") do (echo %%~zi >nul 2>nul&set size=%%~zi&set num=!size:~-1!&set /a mod=!num!%%2
  282. if !mod! equ 0 (move "%dp%\e.tmp" "%pa%" >nul 2>nul) else (echo. >>"%dp%\e.tmp"&move "%dp%\e.tmp" "%pa%" >nul 2>nul))
  283. start "" %%~dpa&set "ercr=Bat加密成功"&goto :soft)
  284. :bitlock
  285. ::系统bitlocker操作,密码8位以上
  286. cls&echo.&echo.                   %batname% - %bii%Bitlocker
  287. for %%a in (%drives%) do (for /f "tokens=1" %%i in ('fsutil fsinfo drivetype %%a:^|find "固定"^|^|fsutil fsinfo drivetype %%a:^|find "可移动"') do (echo.                                   %%i)) 2>nul
  288. echo.&choice /c defghijklmnopqrstuvwxyz10 /n /m "请选择序号(0主菜单,1返回上级)%cho%秒后自动返回:" /t %cho% /d 0
  289. if %errorlevel%==25 (goto :soft)else (if %errorlevel%==24 (call :back)else (set bii=%errorlevel%))
  290. setlocal enabledelayedexpansion&set "str=9defghijklmnopqrstuvwxyz"
  291. set/a r=%bii%%%27
  292. set bii=!str:~%r%,1!:
  293. :dy
  294. call :callnn %bii%Bitlocker :bitlock 2 0 n n 77 88 密码解密 密钥解密 锁定Bit 添加Bit 修改密码 清除加密 返回分区
  295. if "%1" neq "" echo.&echo.                            上次:%1
  296. echo.&if "%pa%"=="1" (dir/ad "%bii%" >nul 2>nul&&call :dy "密码成功"||%systemroot%\system32\manage-bde.exe -unlock %bii% -pw&&call :dy "密码成功"||call :dy "密码错误"
  297. )else (if "%pa%"=="2" ( set /p xx=输入密钥:
  298. dir/ad "%bii%" >nul 2>nul&&call :dy "密钥成功"||%systemroot%\system32\manage-bde.exe -unlock %bii% -rp %xx%&&call :dy "密钥成功"||call :dy "密钥错误"
  299. )else (if "%pa%"=="3" ( dir/ad "%bii%" >nul 2>nul&&%systemroot%\system32\Manage-bde.exe -lock -fd %bii%&&call :dy "锁定成功"||call :dy "锁定失败"
  300. )else (if "%pa%"=="4" ( dir/ad "%bii%" >nul 2>nul&&%systemroot%\system32\Manage-bde.exe -on %bii% -rp>%dp%\pw.txt||call :dy "添加失败"
  301. dir/ad "%bii%" >nul 2>nul&&%systemroot%\system32\Manage-bde.exe -protectors -add %bii% -pw&&start %~dp0nopad.exe %dp%\pw.txt&&call :dy "添加成功"||call :dy "添加失败"
  302. )else (if "%pa%"=="5" ( dir/ad "%bii%" >nul 2>nul&&%systemroot%\system32\Manage-bde.exe -changepassword %bii%&&call :dy "修改成功"||call :dy "修改失败"
  303. )else (if "%pa%"=="6" (dir/ad "%bii%" >nul 2>nul&&%systemroot%\system32\Manage-bde.exe -off %bii%&&call :dy "清除成功"||call :dy "清除失败"
  304. )else ( goto :bitlock))))))
  305. :ashu
  306. cls&setlocal enabledelayedexpansion&echo.&echo.                 %batname% - 转任意进制
  307. echo.&echo.                           a数字,空格分开,n进制
  308. if not "%ercr%"=="" echo.&echo.                              %ercr%
  309. echo.&set/p "pa=输入数字(0返回主菜单):"
  310. set "paa=%pa: =%"&if "%pa%" == "0" goto :back
  311. echo %paa%|findstr /be "[0-9a-zA-Z]*">nul 2>nul||set "ercr=只支持0-9,a-z"&&goto :ashu
  312. for /f "delims=" %%i in ("%pa%") do call :lpp %%i
  313. :lpp
  314. if %2 GTR 36 set "ercr=只支持36进制"&&goto :ashu
  315. echo WScript.Echo(parseInt(WScript.Arguments(0)).toString(%2));>%dp%\10.vbs
  316. echo WScript.Echo(parseInt(WScript.Arguments(0),%2));>%dp%\n.vbs
  317. echo ________________________________________________________________________
  318. (for /f %%a in ('cscript /nologo /e:jscript "%dp%\10.vbs" %1') do echo.&echo.【%1】转【%2】进制是:【0x%%a】)2>nul
  319. (for /f %%a in ('cscript /nologo /e:jscript "%dp%\n.vbs" %1') do echo.&echo.【%1】转【10】进制是:【%%a】)2>nul
  320. echo.&choice /c 0z /n /m "请选择序号(0返回主菜单,z继续操作):" /t 99 /d 0
  321. if %errorlevel%==1 (endlocal&set ercr=<nul&goto :back)else (set ercr=<nul&call :ashu)
  322. :hex
  323. cls&setlocal enabledelayedexpansion&echo.&echo.                 %batname% - 转十六进制
  324. if not "%ercr%"=="" echo.&echo.                              %ercr%
  325. echo WScript.Echo(parseInt(WScript.Arguments(0)).toString(16));>%dp%\10.vbs
  326. echo WScript.Echo(parseInt(WScript.Arguments(0),16));>%dp%\16.vbs
  327. echo.&set/p "pa=输入数字(0返回主菜单):"
  328. if "%pa%" == "0" goto :back
  329. echo %pa%|findstr /be "[0-9a-zA-Z]*">nul 2>nul||set "ercr=只支持0-9,a-z"&&goto :hex
  330. echo ________________________________________________________________________
  331. (for /f %%a in ('cscript /nologo /e:jscript "%dp%\10.vbs" %pa%') do echo.&echo.【%pa%】转【16】进制是:【0x%%a】)2>nul
  332. (for /f %%a in ('cscript /nologo /e:jscript "%dp%\16.vbs" %pa%') do echo.&echo.【%pa%】转【10】进制是:【%%a】)2>nul
  333. echo.&choice /c 0z /n /m "请选择序号(0返回主菜单,z继续操作):" /t 99 /d 0
  334. if %errorlevel%==1 (endlocal&set ercr=<nul&goto :back)else (set ercr=<nul&call :hex)
  335. :erzhi
  336. cls&setlocal enabledelayedexpansion&echo.&echo.                 %batname% - 转二进制
  337. if not "%ercr%"=="" echo.&echo.                              %ercr%
  338. echo WScript.Echo(parseInt(WScript.Arguments(0)).toString(2));>%dp%\10.vbs
  339. echo WScript.Echo(parseInt(WScript.Arguments(0),2));>%dp%\2.vbs
  340. echo.&set/p "pa=输入数字(十转二用0和1,0返回主菜单):"
  341. if "%pa%" == "0" goto :back
  342. echo %pa%|findstr /be "[0-9]*">nul 2>nul||set "ercr=只支持0-9"&&goto :erzhi
  343. echo ________________________________________________________________________
  344. (for /f %%a in ('cscript /nologo /e:jscript "%dp%\10.vbs" %pa%') do echo.&echo.【%pa%】转【2】进制的是:【%%a】)2>nul
  345. (for /f %%a in ('cscript /nologo /e:jscript "%dp%\2.vbs" %pa%') do echo.&echo.【%pa%】转【10】进制的是:【%%a】)2>nul
  346. echo.&choice /c 0z /n /m "请选择序号(0返回主菜单,z继续操作):" /t 99 /d 0
  347. if %errorlevel%==1 (endlocal&set ercr=<nul&goto :back)else (set ercr=<nul&call :erzhi)
  348. :kai
  349. cls&setlocal enabledelayedexpansion&echo.&echo.                 %batname% - 开n次方根
  350. echo.&echo.                  默认二次方根,a数字,空格分开,n次方根
  351. if not "%ercr%"=="" echo.&echo.                              %ercr%
  352. set paa=&set paa=&echo.&set /p "pa=输入数字(0返回主菜单):"
  353. set "pao=%pa: =%"&set pax=&if "%pa%" == "0" goto :back
  354. echo %pao%|findstr /be "[0-9-]*">nul 2>nul||set "ercr=只支持0-9"&&goto :kai
  355. for /f "delims=" %%i in ("%pa%") do call :susu %%i
  356. :susu
  357. set ses=%1&set "pac=!ses:-=!"
  358. if "!ses:~0,1!" equ "-" set "see=-"
  359. echo dim sFile >%dp%\1.vbs
  360. if "%2"=="" (echo sFile=sqr^(%pac%^)>%dp%\1.vbs)else (echo sFile=^(%pac%^)^^^(1/%2^) >>%dp%\1.vbs)
  361. echo wsh.echo sFile >>%dp%\1.vbs
  362. (for /f "delims=" %%i in ('cscript //nologo %dp%\1.vbs') do set pax=%%i)2>nul
  363. echo ________________________________________________________________________
  364. if "%2"=="" echo.&echo.【%pac%】被开平方根:【%pax%】
  365. if not "%2"=="" echo.&echo.【%1】被开【%2】次方根±:【!see!%pax%】
  366. echo.&choice /c 0z /n /m "请选择序号(0返回主菜单,z继续操作):" /t 99 /d 0
  367. if %errorlevel%==1 (endlocal&set ercr=<nul&goto :back)else (set ercr=<nul&set see=<nul&call :kai)
  368. :chifang
  369. cls&setlocal enabledelayedexpansion&echo.&echo.                 %batname% - n次方的积
  370. echo.&echo.                     默认二次方,a数字,空格分开,n次方
  371. if not "%ercr%"=="" echo.&echo.                               %ercr%
  372. echo.&set /p "pa=输入数字(0返回主菜单):"
  373. set "paa=%pa: =%"&set pax=&if "%pa%" == "0" goto :back
  374. echo %paa%|findstr /be "[0-9]*">nul 2>nul||set "ercr=只支持0-9"&&goto :chifang
  375. for /f "delims=" %%i in ("%pa%") do call :susi %%i
  376. :susi
  377. set paa=&echo dim sFile >%dp%\1.vbs
  378. if "%2"=="" (echo sFile=^(%1^)^^2 >>%dp%\1.vbs)else (echo sFile=^(%1^)^^^(%2^) >>%dp%\1.vbs)
  379. echo wsh.echo sFile >>%dp%\1.vbs
  380. (for /f "delims=" %%i in ('cscript //nologo %dp%\1.vbs') do set pax=%%i)2>nul
  381. echo ________________________________________________________________________
  382. if "%2"=="" echo.&echo.【%1】的【2】次方±:【%pax%】
  383. if not "%2"=="" echo.&echo.【%1】的【%2】次方±:【%pax%】
  384. echo.&choice /c 0z /n /m "请选择序号(0返回主菜单,z继续操作):" /t 99 /d 0
  385. if %errorlevel%==1 (endlocal&set ercr=<nul&goto :back)else (set ercr=<nul&call :chifang)
  386. :chu
  387. cls&setlocal enabledelayedexpansion&echo.&echo.                 %batname% - 加减乘除
  388. echo.&echo.                          加减乘除符号:+-*/()
  389. if not "%ercr%"=="" echo.&echo.                               %ercr%
  390. echo.&set num=0&set dec_str=&set input=&set pay=&set paa=
  391. set /p "a=输入数字(0返回主菜单):"
  392. if "%a%" == "0" goto :back
  393. echo %a%|findstr /be "[0-9^+^/^*()-]*">nul 2>nul||set "ercr=只支持0-9"&&goto :chu
  394. echo WScript.Echo FormatNumber(eval(%a%),3,-1) >%dp%\1.vbs
  395. (for /f "delims=" %%i in ('cscript //nologo %dp%\1.vbs') do set pax=%%i)2>nul
  396. for /f "tokens=1,2 delims=." %%a in ("%pax%") do set paa=%%a&if not "%%b"=="" set pay=%%b&set pay=.!pay:~0,3!
  397. echo ________________________________________________________________________
  398. ::echo.&echo.+-×÷方式:【%a%】
  399. echo.&echo.计算值±:【%paa%%pay%】
  400. echo.&choice /c 0z /n /m "请选择序号(0返回主菜单,z继续操作):" /t 99 /d 0
  401. if %errorlevel%==1 (endlocal&set ercr=<nul&goto :back)else (set ercr=<nul&goto :chu)
  402. :main
  403. cls&echo.&echo.                 %batname% - 字符大小写
  404. echo.&echo.                        每字符首个,全部大写、小写
  405. echo.&set /p "str=输入字符串(如区分用空格,0返回主菜单):"
  406. set str= %str%&set str2= %str%&if "%str%" == "0" goto :back
  407. for %%i in (A B 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 set str=%%str:%%i=%%i%%
  408. for %%a in (a b 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 set str2=%%str2:%%a=%%a%%
  409. set str0=%str2%&for %%i in (A B 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 set str0=%%str0: %%i= %%i%%
  410. echo ________________________________________________________________________
  411. echo.&echo.转换首个大写:%str0%&echo.&echo.转换后全大写:%str%&echo.&echo.转换后全小写:%str2%
  412. echo.&choice /c 0z /n /m "请选择序号(0返回主菜单,z继续操作):" /t 99 /d 0
  413. if %errorlevel%==1 (set str=<nul&goto :back)else (set str=<nul&goto :main)
  414. :test
  415. cls&echo.&echo.                 %batname% - 金额大少写
  416. echo.&echo.                         12位整数,"."加2位小数
  417. if not "%ercr%"=="" echo.&echo.                               %ercr%
  418. echo.&setlocal EnableDelayedExpansion
  419. set tbl1=零壹贰叁肆伍陆柒捌玖
  420. set tbl2=分角元拾佰仟万拾佰仟亿拾佰仟
  421. setlocal&set /p "num=输入金额(小于一万亿元,0返回主菜单):"
  422. if "%num%" == "0" goto :back:
  423. echo %num%|findstr /be "[0-9.]*">nul 2>nul||set "ercr=只支持0-9"&&goto :test
  424. for /f "tokens=1,2 delims=." %%a in ("%num%") do (set pax=%%a&if not "%%b"=="" set pay=%%b&set pay=.!pay:~0,2!
  425. set num2=%%b00&set num=%%a!num2:~0,2!)
  426. if "%pax:~12,1%" GTR "" (set "ercr=12位整数,2位小数"&&goto :test) else (set ercr=<nul)
  427. :loop
  428. call set rmb=%%tbl1:~%num:~-1,1%,1%%%%tbl2:~%bit%,1%%%rmb%
  429. set /a bit+=1
  430. set num=%num:~0,-1%
  431. if not "%num%"=="" goto loop
  432. set rmb=%rmb:零拾=零%&set rmb=%rmb:零佰=零%&set rmb=%rmb:零仟=零%
  433. set rmb=%rmb:零零=零%&set rmb=%rmb:零零=零%&set rmb=%rmb:零元=元零%
  434. set rmb=%rmb:零万=万零%&set rmb=%rmb:零亿=亿零%&set rmb=%rmb:零零=零%
  435. set rmb=%rmb:零分=零%&set rmb=%rmb:零角=零%&set rmb=%rmb:角零=角%
  436. set rmb=%rmb:零零=整%%
  437. set s=%pax%&set /a bit+=-2
  438. set pax0=!s:~0,3!
  439. set pax4=!s:~0,1!,!s:~1,3!
  440. set pax5=!s:~0,2!,!s:~2,3!
  441. set pax6=!s:~0,3!,!s:~3,3!
  442. set pax7=!s:~0,1!,!s:~1,3!,!s:~4,3!
  443. set pax8=!s:~0,2!,!s:~2,3!,!s:~5,3!
  444. set pax9=!s:~0,3!,!s:~3,3!,!s:~6,3!
  445. set pax10=!s:~0,1!,!s:~1,3!,!s:~4,3!,!s:~6,3!
  446. set pax11=!s:~0,2!,!s:~2,3!,!s:~5,3!,!s:~8,3!
  447. set pax12=!s:~0,3!,!s:~3,3!,!s:~6,3!,!s:~9,3!
  448. if "%bit%" EQU "4" (set pax=%pax4%)else (if "%bit%" EQU "5" (set pax=%pax5%)else (if "%bit%" EQU "6" (set pax=%pax6%)else (if "%bit%" EQU "7" (set pax=%pax7%)else (if "%bit%" EQU "8" (set pax=%pax8%)else (if "%bit%" EQU "9" (set pax=%pax9%)else (if "%bit%" EQU "10" (set pax=%pax10%)else (if "%bit%" EQU "11" (set pax=%pax11%)else (if "%bit%" EQU "12" (set pax=%pax12%)else (set pax=%pax0%)))))))))
  449. echo ________________________________________________________________________
  450. echo.&echo.人民币小写¥:【%pax%%pay%】
  451. echo.&echo.人民币大写¥:【%rmb%】
  452. echo.&choice /c 0z /n /m "请选择序号(0返回主菜单,z继续操作):" /t 99 /d 0
  453. if %errorlevel%==1 (endlocal&set ercr=<nul&set num=<nul&goto :back)else (endlocal&set ercr=<nul&set num=<nul&goto :test)
  454. :begin
  455. cls&setlocal enabledelayedexpansion
  456. set str=☆★○●◎◇◆□■△▲※→←↑↓〓@〖〗【】『』≈≡∑∈⊙∵∴¤
  457. for /l %%i in (0,1,99) do (
  458. set /a random_=!random!%%32
  459. call set var%%i=%%str:~!random_!,1%%)
  460. echo    99 %var99%  79 %var79%  59 %var59%  39 %var39%  19 %var19%    ^|①从10~99之间任意选择一个数
  461. echo    98 %var98%  78 %var78%  58 %var58%  38 %var38%  18 %var81%    ^|
  462. echo    97 %var97%  77 %var77%  57 %var57%  37 %var37%  17 %var17%    ^|②把这个数的十位与个位相加
  463. echo    96 %var96%  76 %var76%  56 %var56%  36 %var81%  16 %var16%    ^|
  464. echo    95 %var95%  75 %var75%  55 %var55%  35 %var35%  15 %var15%    ^|③再把任意选择的数减去这个和
  465. echo    94 %var94%  74 %var74%  54 %var81%  34 %var34%  14 %var14%    ^|
  466. echo    93 %var93%  73 %var73%  53 %var53%  33 %var33%  13 %var13%    ^|    例如:你选的数是23
  467. echo    92 %var92%  72 %var81%  52 %var52%  32 %var32%  12 %var12%    ^|
  468. echo    91 %var91%  71 %var71%  51 %var51%  31 %var31%  11 %var11%    ^|    然后2+3=5,然后23-5=18
  469. echo    90 %var90%  70 %var70%  50 %var50%  30 %var30%  10 %var10%    ^|
  470. echo    89 %var89%  69 %var69%  49 %var49%  29 %var29%   9 %var81%    ^|④在图表中找出与差值对应的图
  471. echo    88 %var88%  68 %var68%  48 %var48%  28 %var28%   8 %var8%    ^|
  472. echo    87 %var87%  67 %var67%  47 %var47%  27 %var81%   7 %var7%    ^|    形并把这个图形牢记心中
  473. echo    86 %var86%  66 %var66%  46 %var46%  26 %var26%   6 %var6%    ^|
  474. echo    85 %var85%  65 %var65%  45 %var81%  25 %var25%   5 %var5%    ^|⑤然后进入下一步
  475. echo    84 %var84%  64 %var64%  44 %var44%  24 %var24%   4 %var4%    ^|
  476. echo    83 %var83%  63 %var81%  43 %var43%  23 %var23%   3 %var3%    ^|⑥你会发现:显示出来的图形
  477. echo    82 %var82%  62 %var62%  42 %var42%  22 %var22%   2 %var2%    ^|
  478. echo    81 %var81%  61 %var61%  41 %var41%  21 %var21%   1 %var1%    ^|    就是你心里记下的那个图形
  479. echo    80 %var80%  60 %var60%  40 %var40%  20 %var20%   0 %var0%    ^|
  480. echo.&echo.                          按任意键进入下一步...
  481. pause>nul
  482. cls&for /l %%i in (1,1,4) do echo.
  483. echo.                               通过心灵感应
  484. echo.&echo.                           这个图形正是你所想的:
  485. echo.&echo.                               ╭────╮
  486. echo.                               │    │   
  487. echo.                               │  %var81%│
  488. echo.                               │    │
  489. echo.                               ╰────╯                                      
  490. echo.&echo.                          按任意键再来一次...
  491. echo.&echo.&choice /c abcdefghijklmnopqrstuvwxyz0123456789 /n /m "请选择序号(0主菜单)%cho%秒后自动返回:" /t %cho% /d 0
  492. if %errorlevel%==27 (set err=<nul&goto :back)else (goto :begin)
  493. :bbs
  494. cls&echo.&echo.                   %batname% - Win系统工作
  495. echo.&echo.   A.注册表      B.屏幕键盘    C.优化碎片    D.程序管理     E.控制面板
  496. echo.&echo.   F.鼠标管理    G.计算机      H.组策略      I.更新组策略   J.使用CMD
  497. echo.&echo.   K.系统信息    L.网络连接    M.UAC设置     N.语音设置     O.证书管理
  498. echo.&echo.   P.区域设置    Q.日期时间    R.显示设置    S.IE功能设置   T.Dxdiag
  499. echo.&echo.   U.系统配置    V.内存诊断    W.刷新DNS     X.远程连接     Y.磁盘清理
  500. echo.&echo.   Z.全盘清理    2.清理设置    2.系统恢复    3.资源监控     4.打印管理
  501. echo.&echo.   5.放大镜      6.写字板
  502. echo.&choice /c abcdefghijklmnopqrstuvwxyz9876543210 /n /m "请选择序号(0主菜单)%cho%秒后自动返回:" /t %cho% /d 0
  503. set ercr=<nul&if %errorlevel%==36 goto :soft
  504. if %errorlevel%==35 start %systemroot%\system32\cleanmgr.exe /sageset:99
  505. if %errorlevel%==34 start %windir%\system32\RecoveryDrive.exe
  506. if %errorlevel%==33 start %windir%\system32\perfmon.exe /res
  507. if %errorlevel%==32 start %systemroot%\system32\printmanagement.msc
  508. if %errorlevel%==31 start %systemroot%\system32\magnify.exe
  509. if %errorlevel%==30 start %systemroot%\system32\write.exe
  510. if %errorlevel%==1 start %systemroot%\regedit.exe
  511. if %errorlevel%==2 start %systemroot%\system32\osk.exe
  512. if %errorlevel%==3 start %windir%\system32\dfrgui.exe
  513. if %errorlevel%==4 start %systemroot%\system32\appwiz.cpl
  514. if %errorlevel%==5 start %systemroot%\system32\Control
  515. if %errorlevel%==6 start %systemroot%\system32\main.cpl
  516. if %errorlevel%==7 start %systemroot%\system32\compmgmt.msc
  517. if %errorlevel%==8 start %systemroot%\system32\gpedit.msc
  518. if %errorlevel%==9 call %systemroot%\system32\gpupdate /force
  519. if %errorlevel%==10 start %systemroot%\system32\cmd.exe
  520. if %errorlevel%==11 start %systemroot%\system32\msinfo32.exe
  521. if %errorlevel%==12 start %systemroot%\system32\ncpa.cpl
  522. if %errorlevel%==13 start %systemroot%\system32\UserAccountControlSettings.exe
  523. if %errorlevel%==14 start %systemroot%\system32\Speech\SpeechUX\sapi.cpl
  524. if %errorlevel%==15 start %systemroot%\system32\certmgr.msc
  525. if %errorlevel%==16 start %systemroot%\system32\intl.cpl
  526. if %errorlevel%==17 start %systemroot%\system32\timedate.cpl
  527. if %errorlevel%==18 start %systemroot%\system32\desk.cpl
  528. if %errorlevel%==19 start %systemroot%\system32\inetcpl.cpl
  529. if %errorlevel%==20 start %systemroot%\system32\dxdiag.exe
  530. if %errorlevel%==21 start %systemroot%\system32\msconfig.exe
  531. if %errorlevel%==22 start %windir%\system32\MdSched.exe
  532. if %errorlevel%==23 call %systemroot%\system32\ipconfig /flushdns
  533. if %errorlevel%==24 start %systemroot%\system32\mstsc
  534. if %errorlevel%==25 start %systemroot%\system32\cleanmgr.exe
  535. if %errorlevel%==32 start %systemroot%\system32\cleanmgr.exe /sagerun:99
  536. goto :bbs
  537. :info
  538. ::所有版本信息等资料
  539. setlocal enabledelayedexpansion
  540. for /f "tokens=1-2 delims==" %%a in ('findstr /b "FileVersion=" %dp%\st\info.ini') do (set "str=%%b"&set /a n=-1&for %%i in ("!str:.=" "!") do if "!str!" neq "" set /a n=n+1
  541. if "!n!" equ "1" (set fver=%%b.0.0)else (if "!n!" equ "2" (set fver=%%b.0)else (if "!n!" equ "3" (set fver=%%b)else (set fver=0.0.0.0))))
  542. for /f "tokens=1-2 delims==" %%a in ('findstr /b "CompanyName=" %dp%\st\info.ini') do ( if "%%b" neq "" (set cname=%%b) else (set cname=No Company))
  543. for /f "tokens=1-2 delims==" %%a in ('findstr /b "Comments=" %dp%\st\info.ini') do ( if "%%b" neq "" (set bzhu=%%b) else (set bzhu=备注下一个小工具))
  544. for /f "tokens=1-2 delims==" %%a in ('findstr /b "FileDescription=" %dp%\st\info.ini') do ( if "%%b" neq "" (set mshu=%%b) else (set mshu=描述下一个小工具))
  545. for /f "tokens=1-2 delims==" %%a in ('findstr /b "ProductVersion=" %dp%\st\info.ini') do ( set "str=%%b"&set /a n=-1&for %%i in ("!str:.=" "!") do if "!str!" neq "" set /a n=n+1
  546. if "!n!" equ "1" (set pver=%%b.0.0)else (if "!n!" equ "2" (set pver=%%b.0)else (if "!n!" equ "3" (set pver=%%b)else (set pver=0.0.0.0))))
  547. for /f "tokens=1-2 delims==" %%a in ('findstr /b "ProductName=" %dp%\st\info.ini') do ( if "%%b" neq "" (set pname=%%b) else (set pname=MayTools))
  548. for /f "tokens=1-2 delims==" %%a in ('findstr /b "LegalCopyright=" %dp%\st\info.ini') do ( if "%%b" neq "" (set cright=%%b) else (set cright=Everyone))
  549. for /f "tokens=1-2 delims==" %%a in ('findstr /b "LegalTrademarks=" %dp%\st\info.ini') do ( if "%%b" neq "" (set sbiao=%%b) else (set sbiao=No ShanBaio))
  550. for /f "tokens=1-2 delims==" %%a in ('findstr /b "InternalName=" %dp%\st\info.ini') do ( if "%%b" neq "" (set nname=%%b) else (set nname=MayTools))
  551. for /f "tokens=1-2 delims==" %%a in ('findstr /b "SpecialBuild=" %dp%\st\info.ini') do ( if "%%b" neq "" (set spe=%%b) else (set spe=No Special))
  552. for /f "tokens=1-2 delims==" %%a in ('findstr /b "PrivateBuild=" %dp%\st\info.ini') do ( if "%%b" neq "" (set pri=%%b) else (set pri=No Private))
  553. for /f "tokens=1-2 delims==" %%a in ('findstr /b "OriginalFilename=" %dp%\st\info.ini') do ( if "%%b" neq "" (set yname=%%b) else (set yname=MayTools))&setlocal disabledelayedexpansion
  554. ::下面为nsis配置文件
  555. echo RequestExecutionLevel user>%dp%\st\Nsis.nsi
  556. if /i "%bit%" equ "2" echo ^!include "x64.nsh">>%dp%\st\Nsis.nsi
  557. echo outfile '%bp%\%name%.exe'>>%dp%\st\Nsis.nsi
  558. echo SilentInstall silent>>%dp%\st\Nsis.nsi
  559. echo SetCompressor /SOLID lzma >>%dp%\st\Nsis.nsi
  560. echo SetCompressorDictSize 32>>%dp%\st\Nsis.nsi
  561. echo !define MUI_ICON BookTool.ico>>%dp%\st\Nsis.nsi
  562. echo VIAddVersionKey /LANG=2052  "FileVersion" "%fver%">>%dp%\st\Nsis.nsi
  563. echo VIProductVersion "%fver%">>%dp%\st\Nsis.nsi
  564. echo VIAddVersionKey /LANG=2052  "PRODUCTVERSION" "%pver%">>%dp%\st\Nsis.nsi
  565. echo VIAddVersionKey /LANG=2052  "FileDescription" "%mshu%" >>%dp%\st\Nsis.nsi
  566. echo VIAddVersionKey /LANG=2052  "Comments" "%bzhu%" >>%dp%\st\Nsis.nsi
  567. echo VIAddVersionKey /LANG=2052  "OriginalFilename" "%yname%" >>%dp%\st\Nsis.nsi
  568. echo VIAddVersionKey /LANG=2052  "ProductName" "%pname%" >>%dp%\st\Nsis.nsi
  569. echo VIAddVersionKey /LANG=2052  "CompanyName" "%cname%" >>%dp%\st\Nsis.nsi
  570. echo VIAddVersionKey /LANG=2052  "LegalCopyright" "%cright%" >>%dp%\st\Nsis.nsi
  571. echo Icon "%dp%\st\0.ico" >>%dp%\st\Nsis.nsi
  572. echo Section "%pao%" SEC01>>%dp%\st\Nsis.nsi
  573. echo SetOutPath "$%ppa%\%pao%">>%dp%\st\Nsis.nsi
  574. echo SetOverwrite on ;覆盖>>%dp%\st\Nsis.nsi
  575. echo file /r "%patt%\*.*" ;打包用的文件夹>>%dp%\st\Nsis.nsi
  576. echo ;Exec "regedit.exe /s $%ppa%\%pao%\sn.reg">>%dp%\st\Nsis.nsi
  577. echo ;WriteRegStr HKCU "Software\*" "" "">>%dp%\st\Nsis.nsi
  578. if /i "%bit%" equ "2" echo ${If} ${RunningX64}>>%dp%\st\Nsis.nsi
  579. if /i "%bit%" equ "2" echo Execwait "$%ppa%\%pao%\%runexe64%";运行的x64程序>>%dp%\st\Nsis.nsi
  580. if /i "%bit%" equ "2" echo ${Else}>>%dp%\st\Nsis.nsi
  581. echo Execwait "$%ppa%\%pao%\%runexe%">>%dp%\st\Nsis.nsi
  582. if /i "%bit%" equ "2" echo ${EndIf}>>%dp%\st\Nsis.nsi
  583. echo SetOutPath "$%ppa%">>%dp%\st\Nsis.nsi
  584. echo RMDir /r /rebootok "$%ppa%\%pao%" ;删除运行完成后文件夹>>%dp%\st\Nsis.nsi
  585. echo ;DeleteRegKey HKLM "SOFTWARE\*" ;删除注册表>>%dp%\st\Nsis.nsi
  586. echo ;DeleteRegKey HKLM "SOFTWARE\Wow6432Node\*">>%dp%\st\Nsis.nsi
  587. echo SectionEnd>>%dp%\st\Nsis.nsi
  588. ::下面7zSFX资料ini.txt,最后一句ansi为utf8
  589. echo ;!@Install@!UTF-8!>%dp%\st\ini.txt
  590. echo GUIMode="2">>%dp%\st\ini.txt
  591. echo InstallPath="%%%ppa%%%\\%pao%">>%dp%\st\ini.txt
  592. echo RunProgram="hidcon:\"To%runexe%\"">>%dp%\st\ini.txt
  593. echo ;Config file generated by May>>%dp%\st\ini.txt
  594. echo ;!@InstallEnd@!>>%dp%\st\ini.txt
  595. ::call %~dp0info.exe "%dp%\st\ini.txt"
  596. ::下面为winrar调用
  597. echo Path=%%%ppa%%%\%pao%>%dp%\st\win.txt
  598. echo Setup=To%runexe%>>%dp%\st\win.txt
  599. echo Presetup=To%runexe% >>%dp%\st\win.txt
  600. echo Silent=1 >>%dp%\st\win.txt
  601. echo Overwrite=1 >>%dp%\st\win.txt
  602. ::下面为nsis配置成文件7z,winrar,32或64
  603. echo RequestExecutionLevel user>%dp%\st\ToRun.nsi
  604. if /i "%bit%" equ "2" echo ^!include "x64.nsh">>%dp%\st\ToRun.nsi
  605. echo outfile '%dp%\st\To%pao%'>>%dp%\st\ToRun.nsi
  606. echo SilentInstall silent>>%dp%\st\ToRun.nsi
  607. echo SetCompressor /SOLID lzma>>%dp%\st\ToRun.nsi
  608. echo SetCompressorDictSize 32>>%dp%\st\ToRun.nsi
  609. echo !define MUI_ICON BookTool.ico>>%dp%\st\ToRun.nsi
  610. echo VIAddVersionKey /LANG=2052  "FileVersion" "1.0.0.1" >>%dp%\st\ToRun.nsi
  611. echo VIProductVersion "1.0.0.1" >>%dp%\st\ToRun.nsi
  612. echo VIAddVersionKey /LANG=2052  "FileDescription" "MayTools" >>%dp%\st\ToRun.nsi
  613. echo VIAddVersionKey /LANG=2052  "OriginalFilename" "32或64位区分" >>%dp%\st\ToRun.nsi
  614. echo Icon "%dp%\st\0.ico">>%dp%\st\ToRun.nsi
  615. echo Section "$EXEDIR" SEC01>>%dp%\st\ToRun.nsi
  616. echo ;SetOutPath "$EXEDIR">>%dp%\st\ToRun.nsi
  617. echo SetOverwrite on ;覆盖>>%dp%\st\ToRun.nsi
  618. echo ;Exec "regedit.exe /s $TEMP\ActualTitleButtonsCenter64\sn.reg">>%dp%\st\ToRun.nsi
  619. echo ;WriteRegStr HKCU "Software\*" "" "">>%dp%\st\ToRun.nsi
  620. if /i "%bit%" equ "2" echo ${If} ${RunningX64}>>%dp%\st\ToRun.nsi
  621. if /i "%bit%" equ "2" echo ExecWait "$EXEDIR\%runexe64%">>%dp%\st\ToRun.nsi
  622. if /i "%bit%" equ "2" echo ${Else}>>%dp%\st\ToRun.nsi
  623. echo ExecWait "$EXEDIR\%runexe%">>%dp%\st\ToRun.nsi
  624. if /i "%bit%" equ "2" echo ${EndIf}>>%dp%\st\ToRun.nsi
  625. echo RMDir /r /rebootok "$EXEDIR" ;删除文件夹>>%dp%\st\ToRun.nsi
  626. echo ;DeleteRegKey HKLM "SOFTWARE\*" ;删除注册表>>%dp%\st\ToRun.nsi
  627. echo ;DeleteRegKey HKLM "SOFTWARE\Wow6432Node\*">>%dp%\st\ToRun.nsi
  628. echo FileOpen $4 "$%ppa%\%pao%\del.bat" w>>%dp%\st\ToRun.nsi
  629. echo FileWrite $4 'cd..^&rd /s/q "%%~dp0"^&del /q/s/f "%%~f0"$\n'>>%dp%\st\ToRun.nsi
  630. echo FileClose $4 >>%dp%\st\ToRun.nsi
  631. echo ExecShell Open  "$%ppa%\%pao%\del.bat" "" SW_HIDE>>%dp%\st\ToRun.nsi
  632. echo SectionEnd>>%dp%\st\ToRun.nsi
  633. call mshta vbscript:createobject("wscript.shell").run("%~dp0Todo\nsis\makensis.exe /v2 %dp%\st\ToRun.nsi",0)(window.close)
  634. goto :eof
  635. :au3
  636. ::选择后按z返回即进行下一步,如果无选择按z将会按之前的exfile.au3文件生成,$BS_LEFT按钮文字向左
  637. if not exist "%patt%\ico" md "%patt%\ico"&cls
  638. call :callnn 制作后Z返回 :au33 1 1 n exe 77 88
  639. if "%au55%"=="" call :ltty
  640. if "%au55%"=="" set runexe=Do%pa%&set pao=%pax%&set name=%pax%&set bit=1
  641. if "%num%" gtr "0" (set /a hight=%hight%+36&set /a num=%num%+1)else (set /a hight=26&set /a num=1)
  642. %~dp0info.exe "%pa%" "%patt%\ico\%num%.ico" 3&call :ltty
  643. echo $exe%num% = GUICtrlCreateButton("%pax%",50,%hight%,$width+46,30)>>%dp%\st\1
  644. echo $ico%num% = GUICtrlCreateIcon("ico\%num%.ico",0,15,%hight%,30,30)>>%dp%\st\1
  645. if not exist %dp%\st\2 echo While 1 >>%dp%\st\2&&echo $nMsg = GUIGetMsg()>>%dp%\st\2&&echo Switch $nMsg>>%dp%\st\2&&echo Case $GUI_EVENT_CLOSE>>%dp%\st\2&&echo Exit>>%dp%\st\2
  646. echo Case $exe%num%>>%dp%\st\2&echo ShellExecute("%pa%")>>%dp%\st\2&set au55==1&goto :au3
  647. :au33
  648. del /f/s/q/a %dp%\st\exfile.au3&cls&set /a hh=24+%num%*36&set /a hhd=42+%num%*36
  649. echo #Region ;**** 由 AccAu3Wrapper_GUI 创建指令 ****>>%dp%\st\exfile.au3
  650. echo #AccAu3Wrapper_Outfile="Do%pao%.exe">>%dp%\st\exfile.au3
  651. echo #AccAu3Wrapper_Res_Icon_Add="0.ico">>%dp%\st\exfile.au3
  652. echo #AutoIt3Wrapper_icon="0.ico">>%dp%\st\exfile.au3
  653. echo #AutoIt3Wrapper_Res_Description=MayTools>>%dp%\st\exfile.au3
  654. echo #AutoIt3Wrapper_Res_Fileversion=1.0.0.1>>%dp%\st\exfile.au3
  655. echo #EndRegion ;**** 由 AccAu3Wrapper_GUI 创建指令 ****>>%dp%\st\exfile.au3
  656. echo #include ^<ButtonConstants.au3^>>>%dp%\st\exfile.au3
  657. echo #include ^<GUIConstantsEx.au3^>>>%dp%\st\exfile.au3
  658. echo #include ^<StaticConstants.au3^>>>%dp%\st\exfile.au3
  659. echo #include ^<WindowsConstants.au3^>>>%dp%\st\exfile.au3
  660. echo #Region ### START Koda GUI section ### Form=>>%dp%\st\exfile.au3
  661. echo ;长,高,位置左,上>>%dp%\st\exfile.au3
  662. echo $width=%au3%>>%dp%\st\exfile.au3
  663. echo If Not FileExists(@ScriptDir ^& '\width.ini') Then>>%dp%\st\exfile.au3
  664. echo IniWrite(@ScriptDir ^& '\width.ini','width','width',$width)>>%dp%\st\exfile.au3
  665. echo Else>>%dp%\st\exfile.au3
  666. echo $width = IniRead(@ScriptDir ^& '\width.ini','width','width',$width)>>%dp%\st\exfile.au3
  667. echo If $width ^< 30 Then $width = 30>>%dp%\st\exfile.au3
  668. echo EndIf>>%dp%\st\exfile.au3
  669. echo $Form1 = GUICreate("启动", $width+108, %hhd%,@DesktopWidth-$width-118,2)>>%dp%\st\exfile.au3
  670. echo GUISetIcon("%dp%\st\0.ico", -1)>>%dp%\st\exfile.au3
  671. echo ;位置左,上,长,高>>%dp%\st\exfile.au3
  672. echo ;-1, 14, 26, 32, 32,前,上,右,大小>>%dp%\st\exfile.au3
  673. echo $Group1 = GUICtrlCreateGroup("启动程序界面", 5, 8, $width+98, %hh%)>>%dp%\st\exfile.au3
  674. echo GUICtrlCreateGroup("", -99, -99, 1, 1)>>%dp%\st\1
  675. echo GUISetState(@SW_SHOW)>>%dp%\st\1
  676. echo EndSwitch>>%dp%\st\2&echo WEnd>>%dp%\st\2
  677. type %dp%\st\1 >>%dp%\st\exfile.au3
  678. type %dp%\st\2 >>%dp%\st\exfile.au3
  679. if not exist "%dp%\st\0.ico" copy /y "%patt%\ico\1.ico" "%dp%\st\0.ico"
  680. del /f/s/q/a %dp%\st\1&del /f/s/q/a %dp%\st\2&cls
  681. if /i "%start%" equ "11" echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.                            等待下一步......
  682. if /i "%start%" neq "11" echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.                            正在制作中......
  683. call %~dp0au3\aut2exe.exe  /in "%dp%\st\exfile.au3" /out "%patt%\Do%pao%.exe" /nopack /icon "%dp%\st\0.ico" /comp 4
  684. call :au3m
  685. ::下面为小工具,onlysoft批量制作空值文件,bchm批量反编译chm,vbr批量转换reg2bat or nsi,exeico批量提取ico图片,yasuo批量压缩,:cfile批量文件整理,bitlocker系统bitlocker操作
  686. :onlysoft
  687. call :callnn 制作空值文件 :soft 0 a f n 77 88
  688. dir/s/b/a-d "%pa%\*">nul 2>nul||set "ercr=没有制作文件"&&goto :soft
  689. rd /s/q %dp%\file\nobyte&del /f/s/q/a %dp%\file\nobyte&md %dp%\file\nobyte&cls
  690. setlocal enabledelayedexpansion&set "src=%pa%"&set "dst=%dp%\file\nobyte\"&set "pay=<nul"
  691. set ercr=<nul&cls&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.                            正在制作中......
  692. (for /f "delims=" %%a in ('dir/s/b/a-d "%pa%\*"') do (set "str=%%~dpa"&set "pay=!str:%src%=%dst%!"&md "!pay!"&echo.>"!pay!%%~nxa"))2>nul
  693. cls&endlocal&start "" %dp%\file\nobyte&set "ercr=空值制作成功"&goto :soft
  694. :vbr
  695. call :callnn 设置REG路径 :soft 0 a n reg 77 88
  696. dir/ad "%pa%">nul 2>nul&&set "pay=%pa%\*.reg"&&set pa=<nul||set "pay=%pa%"&set pa=<nul
  697. call :callnn 转换BAT/NSI :vbr 2 2 n n 77 88 转为BAT 转为NSIS
  698. if "%pa%" equ "1" (set regfile=reg2bat)else (set regfile=reg2nsi)
  699. md %dp%\file\%regfile%&del /f/s/q/a  %dp%\file\%regfile%\*&copy /y "%pay%" "%dp%\file\%regfile%"&cls
  700. set ercr=<nul&cls&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.                            正在转换中......
  701. if "%pa%" equ "1" (for %%a in ("%dp%\file\%regfile%\*.reg") do (%~dp0Reg2Bat.vbs "%%a"&&del /f/s/q/a "%%a")) >nul 2>nul
  702. if "%pa%" equ "2" (for %%a in ("%dp%\file\%regfile%\*.reg") do (%~dp0Todo\nsis\reg2nsi.exe /i:%%a&&del /f/s/q/a "%%a")) >nul 2>nul
  703. start "" %dp%\file\%regfile%&set "ercr=Reg转换成功"&goto :soft
  704. :exeico
  705. md %dp%\file\ico&md %dp%\file\temp&del /f/s/q/a  %dp%\file\temp\*&cls
  706. call :callnn 提取内部或外部 :soft 2 n 1 n 77 88 选择内部单个 选择内部多个 选择外部都可
  707. if "%pa%" equ "3" (call :callnn 提取exeico图片 :soft 0 a n exe 77 88 2>nul)else (if not "%patt%" equ "" (if "%pa%" equ "1" (dir/s/b/a-d "%patt%\*.exe" >nul 2>nul&&call :callnn 提取exeico图片 :soft 1 1 n exe 77 88 2>nul||set "ercr=无选择或空值"&&goto %bb%)else (dir/s/b/a-d "%patt%\*.exe" >nul 2>nul&&set "pa=%patt%"||set "ercr=无选择或空值"&&goto %bb%))else (set "ercr=无选择或空值"&&goto :soft))
  708. dir/ad "%pa%">nul 2>nul&&set "pax=%pa%"||xcopy /y "%pa%" "%dp%\file\temp"&&set pax=%dp%\file\temp
  709. cls&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.                            正在图片中......
  710. for /f "delims=" %%a in ('dir/s/b/a-d "%pax%\*.exe"') do (%~dp0info.exe %%a "%dp%\file\ico\%%~na.ico" 3) >nul 2>nul
  711. start "" %dp%\file\ico&set "ercr=Ico提取成功"&goto :soft
  712. :yasuo
  713. call :callnn 批量压缩路径 :soft 0 a f n 77 88 2>nul
  714. dir/s/b/a-d "%pa%\*">nul 2>nul&&set "pax=%pa%"&&set png=1&&set pa=<nul||set "ercr=没有压缩文件"&&goto %bb%
  715. :yasuu
  716. call :callnn 压缩保存路径 :yasuu 0 a f n 77 88
  717. set ercr=<nul&dir/ad "%pa%" >nul 2>nul&&set "pay=%pa%"||call :yasuu
  718. call :callnn 批量压缩方式 :yasuo 2 1 n n 77 88 选择7-Zip压缩 选择Winrar压缩
  719. set ercr=<nul&cls&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.                            正在压缩中......
  720. if /i "%pa%"=="1" ((for /f "delims=" %%i in ('dir /b/a "%pax%\*"') do (dir/ad "%pax%\%%i" >nul 2>nul&&%~dp0Todo\7z\7z.exe a -mx=9 -m0=LZMA2 "%pay%\%%i.7z" "%pax%\%%i\*"||%~dp0Todo\7z\7z.exe a -mx=9 -m0=LZMA2 "%pay%\%%~ni.7z" "%pax%\%%i"))>nul 2>nul)else ((for /f "delims=" %%i in ('dir /b/a "%pax%\*"') do (dir/ad "%pax%\%%i" >nul 2>nul&&%~dp0Todo\Rar\Winr.exe a -m5 -s -r -ibck -o+ "%pay%\%%i.rar" -ep1 "%pax%\%%i\"||%~dp0Todo\Rar\Winr.exe a -m5 -s -r -ibck -o+ "%pay%\%%~ni.rar" -ep1 "%pax%\%%i")))
  721. start "" "%pay%"&set "ercr=压缩文件成功"&goto :soft
  722. :cfile
  723. ::文件的归档和重命名
  724. call :callnn 文件操作方式 :soft 2 3 n n 77 88 批量扩展名分类 指定扩展名分类 批量关键字分类 指定关键字分类 按文件时间分类 批量重命名操作
  725. set bit=%pa%&set pa=<nul&set png=1
  726. if "%bit%" equ "2" call :callnn 指定扩展名分类 :cfile 0 b n n 77 多个空格区分
  727. if "%bit%" equ "2" set filex=%pa%
  728. if "%bit%" equ "3" call :callnn 关键字序号 :cfile 0 b 1 n 77 输入数字
  729. if "%bit%" equ "3" set /a cnum=%pa% - 1&set pa=<nul
  730. if "%bit%" equ "3" call :callnn 关键字长度 :cfile 0 b 1 n 77 输入数字
  731. if "%bit%" equ "3" set clon=%pa%&set pa=<nul
  732. if "%bit%" equ "4" call :callnn 指定关键字分类 :cfile 0 b n n 77 多个空格区分
  733. if "%bit%" equ "4" set filex=%pa%
  734. if "%bit%" equ "5" call :callnn 按文件时间分类 :cfile 2 1 n n 77 88 批量创建时间 指定创建时间 批量访问时间 指定访问时间 批量修改时间 指定修改时间
  735. if "%bit%" equ "5" set/a str=%pa%,str2=str%%2
  736. if "%bit%" equ "5" if "%str2%" equ "0" (set biy=2) else (set biy=1)
  737. if "%bit%" equ "5" if "%pa%" leq "2" (set ctim=c&set cnm=c)else (if "%pa%" leq "4" (set ctim=a&set cnm=a)else (set ctim=w&set cnm=w))
  738. if "%bit%" equ "5" if "%biy%" equ "2" call :callnn 设置操作时间 :cfile 0 b n n 77 多个时间空格区分
  739. if "%bit%" equ "5" if "%biy%" equ "2" set timm=%pa%&set pa=<nul
  740. if "%bit%" equ "6" call :callnn 批量重命名操作 :cfile 2 1 n n 77 88 仅随机数命名 日期加随机数 前缀加随机数 前缀日期随机数
  741. if "%bit%" equ "6" set biy=%pa%&set pa=<nul&set filez=<nul
  742. if "%bit%" equ "6" if "%biy%" gtr "2" call :callnn 批量重命名操作 :cfile 0 b n n 77 输入前缀字符
  743. if "%bit%" equ "6" if "%biy%" gtr "2" set filez=%pa%&set pa=<nul
  744. call :callnn 文件处理路径 :soft 0 a f n 77 88
  745. dir/s/b/a-d "%pa%\*">nul 2>nul&&set pax=%pa%&&set pay=%pa%&&set pa=<nul||set "ercr=没有需分类文件"&&goto %bb%
  746. if "%bit%" lss "6" call :callnn 文件保存路径 :soft 2 1 n n 77 88 默认处理路径 指定保存路径
  747. :nwtt
  748. if "%pa%" equ "2" call :callnn 文件保存路径 :cfile 0 a n n 77 88
  749. if "%pa%" equ "1" (set pay=%pax%)else (if "%pa%" equ "2" (goto :nwtt)else (set pay=%pa%&set pa=<nul))
  750. setlocal enabledelayedexpansion&set n=0&cls&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.                            正在操作中......
  751. if "%bit%" equ "1" (for /f "delims=" %%a in ('dir /b/s/a-d "%pax%\*"') do (md %pay%\%%~xa&move "%%a" %pay%\%%~xa&set /a n=n+1))>nul 2>nul
  752. if "%bit%" equ "2" (for %%i in (%filex%) do (for /f "delims=" %%a in ('dir /s/b/a-d "%pax%\*.%%i"') do (md %pay%\%%~xa&move "%%a" %pay%\%%~xa&set /a n=n+1)))>nul 2>nul
  753. if "%bit%" equ "3" (for /f "delims=" %%a in ('dir /s/b/a-d "%pax%\*"') do (set "str=%%~na"&set "pa=!str:~%cnum%,%clon%!"&set "pa=!pa: =!"&md "%pay%\!pa!"&move "%%a" "%pay%\!pa!"&set /a n=n+1))>nul 2>nul
  754. if "%bit%" equ "4" (for %%i in (%filex%) do (for /f "delims=" %%a in ('dir /s/b/a-d "%pax%\*"') do (echo %%a|findstr /c/i "%%i">nul 2>nul&&set "pa=!pa: =!"&md "%pay%\%%i"&&set /a n=n+1&echo %%a|findstr /c/i "%%i">nul 2>nul&&set "pa=!pa: =!"&&move "%%a" "%pay%\%%i")))>nul 2>nul
  755. if "%bit%" equ "5" if "%biy%" equ "1" (for /f "delims=" %%i in ('dir /b/s/a-d "%pax%\*"') do (for /f %%a in ('dir /a /t:%ctim% "%%i"^|find "/"') do (set tim=%%a&set tim=!tim:~0,4!!tim:~5,2!!tim:~8,2!&md %pay%\%cnm%!tim!&move "%%i" %pay%\%cnm%!tim!&set /a n=n+1)))>nul 2>nul
  756. if "%bit%" equ "5" if "%biy%" equ "2" (for %%k in (%timm%) do (for /f "delims=" %%i in ('dir /b/s/a-d/t:%ctim% "%pax%\*"') do (for /f %%a in ('dir /a /t:%ctim% "%%i"^|find "/"') do (set tim=%%a&set tim=!tim:~0,4!!tim:~5,2!!tim:~8,2!&echo !tim!|findstr /c/i "%%k">nul 2>nul&&md %pay%\%cnm%!tim!&echo !tim!|findstr /c/i "%%k">nul 2>nul&&move "%%i" %pay%\%cnm%!tim!&&set /a n=n+1))))>nul 2>nul
  757. if "%bit%" equ "6" (for /f "delims=" %%i in ('dir /b/s/a-d "%pax%\*"') do (for /f %%a in ('dir /a /t:c "%%i"^|find "/"') do (set tim=%%a&set tim=!tim:~0,4!!tim:~5,2!!tim:~8,2!&set num=!RANDOM:~,3!
  758. if "%biy%" equ "3" (ren "%%i" %filez%-!num!%%~xi)else (if "%biy%" equ "2" (ren "%%i" !tim!-!num!%%~xi)else (if "%biy%" equ "4" (ren "%%i" %filez%-!tim!-!num!%%~xi)else (ren "%%i" !num!%%~xi)))
  759. set /a n=n+1)))>nul 2>nul
  760. if "!n!" gtr "0" (start "" "%pay%"&goto :soft)else (set "ercr=未执行归档或重命名"&goto :soft)
  761. :bchm
  762. call :callnn CHM反编译 :soft 0 a n chm 77 88
  763. md %dp%\file\chm&md %dp%\file\temp&del /f/s/q/a  %dp%\file\temp\*&cls
  764. dir/ad "%pa%" >nul 2>nul&&set pat=%pa%||xcopy /y "%pa%" "%dp%\file\temp"&&set pat=%dp%\file\temp
  765. set ercr=<nul&cls&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.                              正在反编译中......
  766. for %%a in ("%pat%\*.chm") do (%~dp0Todo\7z\7z.exe x "%%a" -o"%dp%\file\chm\%%~na"
  767. (for /f %%i in ('dir/ad/b "%dp%\file\chm\%%~na\$*"') do ( rd /s/q "%dp%\file\chm\%%~na\%%i")&&del /f /s /q "%dp%\file\chm\%%~na\*$*.*"&del /f /s /q "%dp%\file\chm\%%~na\*#*.*"))>nul 2>nul
  768. start "" %dp%\file\chm&set "ercr=Chm提取成功"&goto :soft
  769. :admckk
  770. cls&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.                            正在添加中......
  771. (reg delete "HKCR\*\shell\runas" /f
  772. reg add "HKCR\*\shell\runas" /ve /d "获取超级管理员权限" /f
  773. reg add "HKCR\*\shell\runas" /v "Icon" /d "C:\Windows\System32\imageres.dll,-78" /f
  774. reg add "HKCR\*\shell\runas" /v "NoWorkingDirectory" /d "" /f
  775. reg add "HKCR\*\shell\runas\command" /ve /d "cmd.exe /c takeown /f \"%%1\" && icacls \"%%1\" /grant administrators:F" /f
  776. reg add "HKCR\*\shell\runas\command" /v "IsolatedCommand" /d "cmd.exe /c takeown /f \"%%1\" && icacls \"%%1\" /grant administrators:F" /f
  777. reg delete "HKCR\Directory\shell\runas" /f
  778. reg add "HKCR\Directory\shell\runas" /ve /d "获取超级管理员权限" /f
  779. reg add "HKCR\Directory\shell\runas" /v "Icon" /d "C:\Windows\System32\imageres.dll,-78" /f
  780. reg add "HKCR\Directory\shell\runas" /v "NoWorkingDirectory" /d "" /f
  781. reg add "HKCR\Directory\shell\runas\command" /ve /d "cmd.exe /c takeown /f \"%%1\" /r /d y && icacls \"%%1\" /grant administrators:F /t" /f
  782. reg add "HKCR\Directory\shell\runas\command" /v "IsolatedCommand" /d "cmd.exe /c takeown /f \"%%1\" /r /d y && icacls \"%%1\" /grant administrators:F /t" /f
  783. reg delete "HKCR\dllfile\shell" /f
  784. reg add "HKCR\dllfile\shell\runas" /ve /d "获取超级管理员权限" /f
  785. reg add "HKCR\dllfile\shell\runas" /v "HasLUAShield" /d "" /f
  786. reg add "HKCR\dllfile\shell\runas" /v "NoWorkingDirectory" /d "" /f
  787. reg add "HKCR\dllfile\shell\runas\command" /ve /d "cmd.exe /c takeown /f \"%%1\" && icacls \"%%1\" /grant administrators:F" /f
  788. reg add "HKCR\dllfile\shell\runas\command" /v "IsolatedCommand" /d "cmd.exe /c takeown /f \"%%1\" && icacls \"%%1\" /grant administrators:F" /f
  789. reg delete "HKCR\Drive\shell\runas" /f
  790. reg add "HKCR\Drive\shell\runas" /ve /d "获取超级管理员权限" /f
  791. reg add "HKCR\Drive\shell\runas" /v "Icon" /d "C:\Windows\System32\imageres.dll,-78" /f
  792. reg add "HKCR\Drive\shell\runas" /v "NoWorkingDirectory" /d "" /f
  793. reg add "HKCR\Drive\shell\runas\command" /ve /d "cmd.exe /c takeown /f \"%%1\" /r /d y && icacls \"%%1\" /grant administrators:F /t" /f
  794. reg add "HKCR\Drive\shell\runas\command" /v "IsolatedCommand" /d "cmd.exe /c takeown /f \"%%1\" /r /d y && icacls \"%%1\" /grant administrators:F /t" /f)>nul 2>nul
  795. goto :bbs
  796. :quan
  797. ::quan过来的%1,是要导出到的位置,%2为是否显示,delyy删除制作完成后的原文件
  798. echo @echo off^&Mode con cols=72 lines=23^&color e^&cd /d %%~dp0^&%%1 %%2>%1
  799. echo ver^|find "5."^>nul^&^&goto :st^|^|mshta vbscript:createobject("shell.application").shellexecute("%%~s0","goto :st","","runas",%2)(window.close)^&goto :eof>>%1&echo :st>>%1&goto :eof
  800. :cleaner
  801. call :quan %dp%\clearn.bat 0&setlocal enabledelayedexpansion
  802. for %%i in (dmp tmp _mp log gid chk old bak query) do (set n=%%i&echo del /f /s /q /a "%%systemdrive%%\*.!n!">>%dp%\clearn.bat)
  803. for %%i in (pnf InfCache.1) do (set n=%%i&echo del /f /s /q /a "%%SystemRoot%%\inf\*.!n!">>%dp%\clearn.bat)
  804. for %%i in (pnf InfCache.1) do (set n=%%i&echo del /f /s /q /a "%%SystemRoot%%\Driver Cache\*.!n!">>%dp%\clearn.bat)
  805. for %%i in (pnf InfCache.1) do (set n=%%i&echo del /f /s /q /a "%%SystemRoot%%\system32\drivers\*.!n!">>%dp%\clearn.bat)
  806. echo del /f /s /q /a "%%systemdrive%%"\recycled\*.*>>%dp%\clearn.bat
  807. echo del /f /s /q /a "%%SystemRoot%%\prefetch\*.*">>%dp%\clearn.bat
  808. echo del /f /s /q /a "%%SystemRoot%%\minidump\*.*">>%dp%\clearn.bat
  809. echo del /f /s /q /a "%%userprofile%%\local settings\temp\*.*">>%dp%\clearn.bat
  810. echo del /f /s /q /a "%%userprofile%%\Locals~1\Tempor~1\*.*">>%dp%\clearn.bat
  811. echo del /f /s /q /a "%%userprofile%%\Locals~1\Temp\*.*">>%dp%\clearn.bat
  812. echo del /f /s /q /a "%%userprofile%%\recent\*.*">>%dp%\clearn.bat
  813. echo del /f /s /q /a "%%HomePath%%\..\IconCache.db">>%dp%\clearn.bat
  814. echo del /f /s /q /a "%%userprofile%%\cookies\*.*">>%dp%\clearn.bat
  815. echo del /f /s /q /a "%%userprofile%%\local settings\temporary internet files\*.*">>%dp%\clearn.bat
  816. echo rd /s /q "%%SystemRoot%%\Downloaded Program Files">>%dp%\clearn.bat
  817. echo rd /s /q "%%SystemRoot%%\Offline Web Pages">>%dp%\clearn.bat
  818. echo rd /s /q "%%SystemRoot%%\Connection Wizard">>%dp%\clearn.bat
  819. echo rd /s /q "%%SystemRoot%%\SoftwareDistribution\Download">>%dp%\clearn.bat
  820. echo rd /s /q "%%SystemRoot%%\Assembly">>%dp%\clearn.bat
  821. echo rd /s /q "%%SystemRoot%%\Help">>%dp%\clearn.bat
  822. echo rd /s /q "%%SystemRoot%%\system32\ReinstallBackups">>%dp%\clearn.bat
  823. echo rd /s /q "%%SystemRoot%%\temp" ^& md "%%SystemRoot%%\temp">>%dp%\clearn.bat
  824. echo rd /s /q "%%SystemRoot%%\$hf_mig$">>%dp%\clearn.bat
  825. echo dir "%%SystemRoot%%\$NtUninstall*" /a:d /b ^>%%temp%%\update.txt>>%dp%\clearn.bat
  826. echo for /f %%%%i in (%%temp%%\update.txt) do (rd %%SystemRoot%%\%%%%i /s /q )>>%dp%\clearn.bat
  827. echo dir "%%SystemRoot%%\inf\*.*" /ad/b ^>%%temp%%\vTmp.txt >>%dp%\clearn.bat
  828. echo for /f %%%%a in (%%temp%%\vTmp.txt) do ( rd /s /q "%%SystemRoot%%\inf\%%%%a")>>%dp%\clearn.bat
  829. echo dir "%%SystemDrive%%\found.???" /ad/b ^>%%temp%%\vTmp.txt >>%dp%\clearn.bat
  830. echo for /f %%%%a in (%%temp%%\vTmp.txt) do ( rd /s /q "%%SystemDrive%%\inf\%%%%a")>>%dp%\clearn.bat
  831. echo dir "%%SystemRoot%%\$*$" /ad/b ^>%%temp%%\vTmp.txt>>%dp%\clearn.bat
  832. echo for /f %%%%a in (%%temp%%\vTmp.txt) do ( rd /s /q "%%SystemRoot%%\%%%%a")>>%dp%\clearn.bat
  833. echo cd..^&for /f "delims=" %%%%a in ('dir/ad/b "%%temp%%"') do ( rd /s/q "%%temp%%\%%%%a")^&del /s/f/q/a  %%temp%%\*>>%dp%\clearn.bat
  834. echo cd..^&for /f "delims=" %%%%a in ('dir/ad/b "%%tmp%%"') do ( rd /s/q "%%tmp%%\%%%%a")^&del /s/f/q/a  %%tmp%%\*>>%dp%\clearn.bat
  835. echo exit /b>>%dp%\clearn.bat
  836. call %dp%\clearn.bat&goto :soft
复制代码
1

评分人数

厉害了,我滴哥!!!!

TOP

留个楼备用没准哪天用到
这么好的论坛你上哪找,运行测试环境为6.1.7601-64
注:请遵守互联网信息安全,勿用于非法用途

TOP

看起来好厉害的样子

TOP

有点晕,不明觉厉!

TOP

好像應該貼到這區保留
http://www.bathome.net/forum-6-1.html
带内地用语或带里语的文章,在下读写总觉有点吃力;
如误解了各位意思的讲勿见怪   ^_^

TOP

厉害了我的哥,你真有精力。

都写到一个批处理里是个大工程,维护困难繁琐,还是分文件 Call 调用好一点吧

TOP

返回列表