1 Star 0 Fork 11

beybeyzk/newbeepe

forked from 江南一根葱/newbeepe 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
20210519把文件添加到wim.bat 3.89 KB
一键复制 编辑 原始数据 按行查看 历史
江南一根葱 提交于 2021-05-19 22:56 . add play.txt
:::::goto ok
cd /d %~dp0
set optwim=%~dp0minix86_64.wim
set testwim=%~dp0temp.wim
set localpath=%~dp0ok
if not exist %localpath% mkdir %localpath%
copy /y %optwim% %testwim%
:starttest
:::a b c e f g h i j k l m n o p q r s t u v w x y z
for %%a in ( a b c e f g h i j k l m n o p ) do (
echo 正在添加姓%%a的dll文件
for /f %%b in ('dir /b %localpath%\windows\system32\%%a*.dll %%a*.nls %%a*.drv %%a*.sys') do bin\wimlib update %testwim% --command="add %localpath%\windows\system32\%%b \windows\system32\%%b "
)
::call :adddir1
call :adddir2
call :rebuild
:adddir1
bin\wimlib update %testwim% 1 --command="add %localpath%\Windows\L2Schemas \Windows\L2Schemas"
bin\wimlib update %testwim% 1 --command="add %localpath%\Windows\resources \Windows\resources"
bin\wimlib update %testwim% 1 --command="add %localpath%\Windows\servicing \Windows\servicing"
bin\wimlib update %testwim% 1 --command="add %localpath%\Windows\SystemResources \Windows\SystemResources"
::bin\wimlib update %testwim% 1 --command="add %localpath%\Windows\SysWOW64 \Windows\SysWOW64"
bin\wimlib update %testwim% 1 --command="add %localpath%\Windows\Web \Windows\Web"
bin\wimlib update %testwim% 1 --command="add %localpath%\Windows\WinSxS \Windows\WinSxS"
bin\wimlib update %testwim% 1 --command="add %localpath%\Windows\zh-CN \Windows\zh-CN"
bin\wimlib update %testwim% 1 --command="add %localpath%\Windows\apppatch \Windows\apppatch"
bin\wimlib update %testwim% 1 --command="add %localpath%\Windows\Boot \Windows\Boot"
bin\wimlib update %testwim% 1 --command="add %localpath%\Windows\Branding \Windows\Branding"
bin\wimlib update %testwim% 1 --command="add %localpath%\Windows\Fonts \Windows\Fonts"
bin\wimlib update %testwim% 1 --command="add %localpath%\Windows\Globalization \Windows\Globalization"
exit /b
:::call :rebuild
:adddir2
::bin\wimlib update %testwim% 1 --command="add %localpath%\Windows\System32\Boot \Windows\System32\Boot"
::bin\wimlib update %testwim% 1 --command="add %localpath%\Windows\System32\CatRoot \Windows\System32\CatRoot"
::bin\wimlib update %testwim% 1 --command="add %localpath%\Windows\System32\CodeIntegrity \Windows\System32\CodeIntegrity"
::bin\wimlib update %testwim% 1 --command="add %localpath%\Windows\System32\Dism \Windows\System32\Disms"
::::bin\wimlib update %testwim% 1 --command="add %localpath%\Windows\SysWOW64 \Windows\SysWOW64"
::bin\wimlib update %testwim% 1 --command="add %localpath%\Windows\System32\drivers \Windows\System32\drivers"
::bin\wimlib update %testwim% 1 --command="add %localpath%\Windows\System32\DriverStore \Windows\System32\DriverStore"
::bin\wimlib update %testwim% 1 --command="add %localpath%\Windows\System32\networklist \Windows\System32\networklist"
bin\wimlib update %testwim% 1 --command="add %localpath%\Windows\System32\zh-CN \Windows\System32\zh-CN"
exit /b
:rebuild
::bin\wimlib update %testwim% --command="add app_iscsi \ "
echo 添加完成,重建%testwim%.
bin\wimlib optimize %testwim%
echo 任务全部完成
exit /b
::放pe里检测缺失文件
:checkcheck
for /f %%a in (%~dp0最终姓氏文件.txt) do (
if not exist %%a echo pe中没有 %%a>>bug.txt
)
pause
:::::::::::::::::::::::::::::::::::::::::::::其它备用脚本::::::::::::::::::::::::::::::::::::::::::::::::::::::
::: 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
:retest
for %%a in ( s t ) do (
echo 正在添加姓%%a的dll文件
for /f %%b in ('dir /b file\windows\system32\drivers\%%a*.sys') do bin\wimlib update %testwim% --command="add %localpath%\drivers\%%b \windows\system32\%%b "
)
goto rebuild
:ok
for %%a in ( s ) do (
for /f %%a in ('dir /b ok\windows\system32\%%a*.dll') do echo X:\windows\system32\%%a >>最终姓氏文件.txt
)
pause
:sure
bin\wimlib update %~dp0%wimfile% --command="add file\windows\system32\drivers\tdx.sys \windows\system32\drivers\tdx.sys "
goto rebuild
exit /b
pause
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/beybeyzk/newbeepe.git
[email protected]:beybeyzk/newbeepe.git
beybeyzk
newbeepe
newbeepe
main

搜索帮助