修正兩處實機部署失敗的 XML bug;新增 DEPLOY.md 紀錄本機 USB 部署

- 根元素加上 xmlns:wcm / xmlns:xsi 命名空間宣告,否則全檔 wcm:action 無法解析(第 27 行第 9 欄即炸)
- ComputerName 改用 *,隨機後綴改由 FirstLogonCommands 的 Rename-Computer 產生;原本 PC-%RAND:5% 並非 Windows Setup 內建巨集,字面送入導致 specialize 階段 Shell-Setup 失敗
- 同步更正 CLAUDE.md / SUMMARY.md 對 %RAND:5% 的錯誤說明
- 新增 DEPLOY.md:/Volumes/Ventoy 的實際檔案佈局與重建步驟

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-22 18:59:35 +08:00
parent fd795f3d66
commit e106d749c7
4 changed files with 112 additions and 4 deletions

View File

@@ -40,7 +40,7 @@ There is no way to "run" this repo on the dev machine (macOS). All verification
- **The disk config assumes UEFI+GPT and wipes the selected disk unconditionally** (`WillWipeDisk=true`). Any BIOS/MBR target requires rewriting `<DiskConfiguration>`; there is no runtime branching.
- **`processorArchitecture="amd64"`** is hardcoded on every `<component>`. ARM64 deployments require a global find-and-replace to `arm64`.
- **Password is plaintext** (`<PlainText>true</PlainText>`). This is a deliberate testing-only choice documented in `SUMMARY.md`. For production, generate Base64 via Windows SIM; do not hand-encode.
- **`%RAND:5%`** in `ComputerName` is a Windows Setup built-in, not a shell variable — don't try to "fix" it. (Distinct from `$$VT_*$$` which is a Ventoy pre-processor substitution.)
- **`ComputerName` does not support `%RAND:5%` or any other macro.** Windows Setup only accepts a literal name, `*` (auto-generate a random name like `DESKTOP-ABC123D`), or an empty value. `%RAND:N%` is an MDT/SCCM task-sequence variable — under the Ventoy → raw `unattend.xml` path it is passed verbatim as a literal string, fails NetBIOS character validation (`%` is not allowed), and causes the specialize pass to abort with a `Microsoft-Windows-Shell-Setup` error. If a `PC-XXXXX` style name is required, set `<ComputerName>*</ComputerName>` here and do the rename in `FirstLogonCommands` via `Rename-Computer` (a reboot is needed for it to take effect — combine with the existing `shutdown /r` step). (Distinct from `$$VT_*$$`, which *is* a real Ventoy pre-processor substitution.)
- **`FirstLogonCommands` references `C:\Scripts\Setup.ps1`** but this repo does **not** contain that script. It is expected to be placed on the target by other means (baked into the image, copied from USB earlier in `FirstLogonCommands`, or pulled from network).
## When making changes