Files
windows-unattend/steps
Timmy ff796ff299 16-install-telegram 補上 ACL 修正:grant BUILTIN\\Users RX 整個 package
winget 解 portable zip 時,'Telegram\' 內層目錄會 break ACL inheritance,
只剩 Admin/Administrators/SYSTEM,BUILTIN\\Users 沒進去。
即使把 User 加進 Administrators 群組,UAC 雙擊用標準 token 跑時仍被擋,
彈出「無法存取此捷徑所參照的項目,沒有適當的權限」。

修法:winget 裝完之後 icacls /grant BUILTIN\\Users RX 整個 package 目錄樹。
Chrome 沒這個問題(自家 installer 自己處理 ACL),所以只要修 Telegram。
2026-04-28 08:46:56 +08:00
..

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
steps/ — 拆解後的 post-install 步驟,每段一個 .bat 雙擊執行
==========================================================

用法
----
1. 把 USB 插上 Windows 機器
2. 用檔案總管打開 D:\ventoy\script\steps\D 換成 USB 在 Windows 看到的代號)
3. 雙擊任一個 NN-xxx.bat會自動 UAC 提權)
4. 黑色 console 視窗會即時顯示 START / DONE / ERR
5. 跑完按任意鍵關掉視窗

想一次跑完,雙擊 RUN-ALL.bat 即可。

順序建議
--------
Phase 1不需要網路本機設定
  01-firewall-ssh-22                  防火牆開 SSH 22
  02-rdp-enable-3389                  打開 RDP
  03-icmp-echo-allow                  允許 ping
  04-winrm-enable                     啟用 WinRM
  05-onedrive-remove                  移除 OneDrive
  06-cortana-websearch-off            關 Cortana / Web Search
  07-apply-ui-ime-default-profile     UI/IME 預設套到 Default profile
  08-hide-admin-account               把 Admin 從登入畫面藏掉
  09-pause-windows-update             暫停 WU避免下面動作搶頻寬

Phase 2需要網路下載安裝
  10-openssh-server-install           OpenSSH Server FoD
  11-kms-activate                     KMS 啟用
  12-winget-install-chrome            裝 Chrome
  13-remove-windows-ai                RemoveWindowsAI 線上腳本
  14-win11debloat                     Win11Debloat讀同目錄 win11debloat-config.json
  15-remove-uwp-apps                  批次移除 UWP
  16-install-telegram                 裝 Telegram

收尾
  17-resume-trigger-wu                解除 WU 暫停 + 觸發掃描

Log
---
所有 step.ps1 共用同一個 log
  C:\Windows\Temp\setup.log

每段會印 [時間] === 段名 START === / DONE === / ERR ===

檔案結構
--------
  _common.ps1                共用 helperLog / Section / Set-RegValue / Wait-Network
  _template.bat              .bat 樣板(不要動)
  NN-xxx.ps1                 各段邏輯
  NN-xxx.bat                 各段 .bat自動 UAC + 跑 .ps1
  win11debloat-config.json   14 段用的 JSON 設定
  RUN-ALL.bat                依序跑 01..17 全部