Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

Win7 封裝自動應答檔實戰經驗:CopyProfile、AutoLogon、跳過 OOBE、IE8 設定、ProfilesDirectory 難題

編輯:Win7 系統基礎知識

封裝流程回顧

執行 sysprep /oobe /generalize /shutdown 重啟後,電腦進入 **特殊化** 階段 → **OOBE** 階段。自動應答檔在這兩階段注入設定,實現無人值守部署。

關鍵設定實作

1. 複製目前使用者設定檔為預設設定檔

階段:**specialize**

Microsoft-Windows-Shell-Setup
  CopyProfile = true

效果:封裝時將目前登入使用者的完整設定(桌面捷徑、開始功能表、登錄偏好等)複製到 Default 設定檔,新建使用者即繼承。

2. 自動啟用並自動登入 Administrator

階段:**specialize**

Microsoft-Windows-Shell-Setup
  AutoLogon
    Enabled = true
    Username = Administrator
    Password = 密碼
    LogonCount = 3          # 自動登入次數,視需求調整
    PlainText = true

參考「Windows 7 步步為營」系列文章。

3. 跳過 OOBE 階段(不建立新使用者、不顯示歡迎畫面)

階段:**oobeSystem**

Microsoft-Windows-Shell-Setup
  OOBE
    HideEULAPage = true
    HideWirelessSetupInOOBE = true
    NetworkLocation = Work
    ProtectYourPC = 3
    SkipMachineOOBE = true
    SkipUserOOBE = true

代價: 犧牲 ProfilesDirectory、FirstLogonCommands、LogonCommands 等 OOBE 階段可用設定。

4. IE8 設定(specialize 階段)

Microsoft-Windows-IE-InternetExplorer
  Home_Page = https://intranet.company.com
  SearchScopes 預設搜尋引擎
  Favorites 內建我的最愛
  DisableFirstRunWizard = true
  DisableWelcomePage = true

待解難題:跳過 OOBE 時如何修改預設設定檔路徑?

預設 C:\Users 想移至 D:\Users。正常在 oobeSystem → Microsoft-Windows-Shell-Setup → ProfilesDirectory 設定。但跳過 OOBE 後此設定不生效。

嘗試方向:利用「接管 Windows 部署」階段(auditUser/oobeSystem 交界),透過 FirstLogonCommands 執行 reg import 修改註冊表 HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList 中的 ProfilesDirectory、`Default`、`Public` 路徑。但時序與權限極難把控,尚未成功驗證。

若有前輩成功經驗請不吝分享!

工具鏈

  • Windows AIK (Assessment and Installation Kit) → Windows SIM (系統映像管理器) 編輯 autounattend.xml。
  • 部署時放入映像根目錄或透過 sysprep /unattend:autounattend.xml 指定。

心得

封裝核心在於理解階段順序與元件相依性。建議先用 Windows SIM 開啟範例 XML 研讀,再逐項加入需求設定。記錄每次測試結果,建立個人知識庫。

Copyright © Windows教程網 All Rights Reserved