windows: 修复无法安装评估版 iso

This commit is contained in:
bin456789 2024-01-20 16:04:06 +08:00
parent 73d2220c2b
commit 9425de5078
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B

View File

@ -2024,6 +2024,15 @@ install_windows() {
sed -i "s|%installto_partitionid%|1|" /tmp/autounattend.xml
fi
# 评估版 iso 需要删除 autounattend.xml 里面的 <Key />
# 否则会出现 Windows Cannot find Microsoft software license terms
# shellcheck disable=SC2010
if ei_cfg="$(ls -d /os/installer/sources/* | grep -i ei.cfg)"; then
if grep -i EVAL "$ei_cfg"; then
sed -i '/<Key \/>/d' /tmp/autounattend.xml
fi
fi
# 挂载 boot.wim
mkdir -p /wim
wimmountrw $boot_wim 2 /wim/