From e86624fb4183fb2154b41bc9fd798d3512b4c93f Mon Sep 17 00:00:00 2001 From: bin456789 Date: Mon, 14 Oct 2024 00:50:42 +0800 Subject: [PATCH] =?UTF-8?q?windows:=20=E6=98=BE=E7=A4=BA=20autounattend.xm?= =?UTF-8?q?l=20=E6=97=B6=E5=B1=8F=E8=94=BD=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- trans.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/trans.sh b/trans.sh index 4615aaf..7c7b607 100644 --- a/trans.sh +++ b/trans.sh @@ -4238,10 +4238,11 @@ install_windows() { # 移除注释,否则 windows-setup.bat 重新生成的 autounattend.xml 有问题 apk add xmlstarlet xmlstarlet ed -d '//comment()' /tmp/autounattend.xml >/wim/autounattend.xml - apk del xmlstarlet unix2dos /wim/autounattend.xml info "autounattend.xml" - cat -n /wim/autounattend.xml + # 查看最终文件,并屏蔽密码 + xmlstarlet ed -d '//*[name()="AdministratorPassword" or name()="Password"]' /wim/autounattend.xml | cat -n + apk del xmlstarlet # 避免无参数运行 setup.exe 时自动安装 mv /wim/autounattend.xml /wim/windows.xml