- unattend.xml: DiskID 由硬寫 0 改成 $$VT_WINDOWS_DISK_1ST_NONVTOY$$, 防止在 Ventoy 下把 USB 本身當成安裝目標 - ventoy.json: 新增 Auto Install plugin 設定範本 - QUICKSTART.md: 用 Ventoy 流程重寫 USB 佈置與 VM 測試章節 - README.md: 放置位置表新增 Ventoy 路徑為預設 - CLAUDE.md: 新增專案導覽文件,標註 Ventoy-only 前提與 DiskID 變數 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
169 lines
6.2 KiB
XML
169 lines
6.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<unattend xmlns="urn:schemas-microsoft-com:unattend">
|
||
|
||
<!-- Pass 1: windowsPE — 安裝前的基本設定 -->
|
||
<settings pass="windowsPE">
|
||
<component name="Microsoft-Windows-International-Core-WinPE"
|
||
processorArchitecture="amd64"
|
||
publicKeyToken="31bf3856ad364e35"
|
||
language="neutral"
|
||
versionScope="nonSxS">
|
||
<SetupUILanguage>
|
||
<UILanguage>zh-TW</UILanguage>
|
||
</SetupUILanguage>
|
||
<InputLocale>0404:00000404</InputLocale> <!-- 繁體中文鍵盤 -->
|
||
<SystemLocale>zh-TW</SystemLocale>
|
||
<UILanguage>zh-TW</UILanguage>
|
||
<UserLocale>zh-TW</UserLocale>
|
||
</component>
|
||
|
||
<component name="Microsoft-Windows-Setup"
|
||
processorArchitecture="amd64"
|
||
publicKeyToken="31bf3856ad364e35"
|
||
language="neutral"
|
||
versionScope="nonSxS">
|
||
<!-- 磁碟分割(UEFI + GPT)。Ventoy 變數:避開 Ventoy USB 自己,挑第一顆非-Ventoy 磁碟 -->
|
||
<DiskConfiguration>
|
||
<Disk wcm:action="add">
|
||
<DiskID>$$VT_WINDOWS_DISK_1ST_NONVTOY$$</DiskID>
|
||
<WillWipeDisk>true</WillWipeDisk>
|
||
<CreatePartitions>
|
||
<CreatePartition wcm:action="add">
|
||
<Order>1</Order><Type>EFI</Type><Size>500</Size>
|
||
</CreatePartition>
|
||
<CreatePartition wcm:action="add">
|
||
<Order>2</Order><Type>MSR</Type><Size>128</Size>
|
||
</CreatePartition>
|
||
<CreatePartition wcm:action="add">
|
||
<Order>3</Order><Type>Primary</Type><Extend>true</Extend>
|
||
</CreatePartition>
|
||
</CreatePartitions>
|
||
<ModifyPartitions>
|
||
<ModifyPartition wcm:action="add">
|
||
<Order>1</Order><PartitionID>1</PartitionID>
|
||
<Format>FAT32</Format><Label>System</Label>
|
||
</ModifyPartition>
|
||
<ModifyPartition wcm:action="add">
|
||
<Order>2</Order><PartitionID>3</PartitionID>
|
||
<Format>NTFS</Format><Label>Windows</Label><Letter>C</Letter>
|
||
</ModifyPartition>
|
||
</ModifyPartitions>
|
||
</Disk>
|
||
</DiskConfiguration>
|
||
|
||
<ImageInstall>
|
||
<OSImage>
|
||
<InstallTo>
|
||
<DiskID>$$VT_WINDOWS_DISK_1ST_NONVTOY$$</DiskID><PartitionID>3</PartitionID>
|
||
</InstallTo>
|
||
<InstallToAvailablePartition>false</InstallToAvailablePartition>
|
||
</OSImage>
|
||
</ImageInstall>
|
||
|
||
<!-- 產品序號(若用 KMS/批次授權可留空或填通用金鑰)-->
|
||
<UserData>
|
||
<ProductKey>
|
||
<Key>XXXXX-XXXXX-XXXXX-XXXXX-XXXXX</Key>
|
||
<WillShowUI>OnError</WillShowUI>
|
||
</ProductKey>
|
||
<AcceptEula>true</AcceptEula>
|
||
<FullName>IT Department</FullName>
|
||
<Organization>YourCompany</Organization>
|
||
</UserData>
|
||
</component>
|
||
</settings>
|
||
|
||
<!-- Pass 2: specialize — 電腦名稱、時區、網域 -->
|
||
<settings pass="specialize">
|
||
<component name="Microsoft-Windows-Shell-Setup"
|
||
processorArchitecture="amd64"
|
||
publicKeyToken="31bf3856ad364e35"
|
||
language="neutral"
|
||
versionScope="nonSxS">
|
||
<ComputerName>PC-%RAND:5%</ComputerName>
|
||
<TimeZone>Taipei Standard Time</TimeZone>
|
||
<RegisteredOwner>IT Department</RegisteredOwner>
|
||
<RegisteredOrganization>YourCompany</RegisteredOrganization>
|
||
</component>
|
||
</settings>
|
||
|
||
<!-- Pass 3: oobeSystem — 首次啟動 OOBE 與帳號建立 -->
|
||
<settings pass="oobeSystem">
|
||
<component name="Microsoft-Windows-International-Core"
|
||
processorArchitecture="amd64"
|
||
publicKeyToken="31bf3856ad364e35"
|
||
language="neutral"
|
||
versionScope="nonSxS">
|
||
<InputLocale>0404:00000404</InputLocale>
|
||
<SystemLocale>zh-TW</SystemLocale>
|
||
<UILanguage>zh-TW</UILanguage>
|
||
<UserLocale>zh-TW</UserLocale>
|
||
</component>
|
||
|
||
<component name="Microsoft-Windows-Shell-Setup"
|
||
processorArchitecture="amd64"
|
||
publicKeyToken="31bf3856ad364e35"
|
||
language="neutral"
|
||
versionScope="nonSxS">
|
||
|
||
<!-- 略過所有 OOBE 畫面 -->
|
||
<OOBE>
|
||
<HideEULAPage>true</HideEULAPage>
|
||
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
|
||
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
|
||
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
||
<NetworkLocation>Work</NetworkLocation>
|
||
<ProtectYourPC>3</ProtectYourPC>
|
||
<SkipMachineOOBE>true</SkipMachineOOBE>
|
||
<SkipUserOOBE>true</SkipUserOOBE>
|
||
</OOBE>
|
||
|
||
<!-- 建立本機管理員帳號 -->
|
||
<UserAccounts>
|
||
<LocalAccounts>
|
||
<LocalAccount wcm:action="add">
|
||
<Name>Admin</Name>
|
||
<DisplayName>Administrator</DisplayName>
|
||
<Group>Administrators</Group>
|
||
<Password>
|
||
<Value>P@ssw0rd!</Value>
|
||
<PlainText>true</PlainText>
|
||
</Password>
|
||
</LocalAccount>
|
||
</LocalAccounts>
|
||
</UserAccounts>
|
||
|
||
<AutoLogon>
|
||
<Username>Admin</Username>
|
||
<Enabled>true</Enabled>
|
||
<LogonCount>1</LogonCount>
|
||
<Password>
|
||
<Value>P@ssw0rd!</Value>
|
||
<PlainText>true</PlainText>
|
||
</Password>
|
||
</AutoLogon>
|
||
|
||
<!-- 首次登入執行的自訂腳本 -->
|
||
<FirstLogonCommands>
|
||
<SynchronousCommand wcm:action="add">
|
||
<Order>1</Order>
|
||
<CommandLine>powershell.exe -ExecutionPolicy Bypass -File C:\Scripts\Setup.ps1</CommandLine>
|
||
<Description>執行部署後設定腳本</Description>
|
||
<RequiresUserInput>false</RequiresUserInput>
|
||
</SynchronousCommand>
|
||
<SynchronousCommand wcm:action="add">
|
||
<Order>2</Order>
|
||
<CommandLine>cmd.exe /c net accounts /maxpwage:unlimited</CommandLine>
|
||
<Description>密碼永不過期</Description>
|
||
</SynchronousCommand>
|
||
<SynchronousCommand wcm:action="add">
|
||
<Order>3</Order>
|
||
<CommandLine>shutdown /r /t 5</CommandLine>
|
||
<Description>完成後重開機</Description>
|
||
</SynchronousCommand>
|
||
</FirstLogonCommands>
|
||
</component>
|
||
</settings>
|
||
|
||
</unattend>
|