2023-05-25 20:15:12 +08:00
|
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
|
<unattend xmlns="urn:schemas-microsoft-com:unattend">
|
2024-01-27 23:17:50 +08:00
|
|
|
|
|
2023-05-25 20:15:12 +08:00
|
|
|
|
<settings pass="windowsPE">
|
|
|
|
|
<component name="Microsoft-Windows-Setup" processorArchitecture="%arch%" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
2024-05-22 21:08:10 +08:00
|
|
|
|
<!-- 安装过程可节省一点内存?vista 要删除不然报错 -->
|
|
|
|
|
<EnableFirewall>false</EnableFirewall>
|
2023-05-25 20:15:12 +08:00
|
|
|
|
<UserData>
|
|
|
|
|
<AcceptEula>true</AcceptEula>
|
|
|
|
|
<ProductKey>
|
2024-01-28 22:46:38 +08:00
|
|
|
|
<Key>%key%</Key>
|
2023-05-25 20:15:12 +08:00
|
|
|
|
</ProductKey>
|
|
|
|
|
</UserData>
|
|
|
|
|
<ImageInstall>
|
|
|
|
|
<OSImage>
|
|
|
|
|
<InstallFrom>
|
|
|
|
|
<MetaData wcm:action="add">
|
|
|
|
|
<Key>/IMAGE/NAME</Key>
|
|
|
|
|
<Value>%image_name%</Value>
|
|
|
|
|
</MetaData>
|
|
|
|
|
</InstallFrom>
|
|
|
|
|
<InstallTo>
|
2023-10-28 22:24:05 +08:00
|
|
|
|
<DiskID>%disk_id%</DiskID>
|
2023-05-28 00:52:48 +08:00
|
|
|
|
<PartitionID>%installto_partitionid%</PartitionID>
|
2023-05-25 20:15:12 +08:00
|
|
|
|
</InstallTo>
|
|
|
|
|
</OSImage>
|
|
|
|
|
</ImageInstall>
|
2024-05-29 21:30:24 +08:00
|
|
|
|
<!-- 用注册表无法绕过 cpu 核数限制 -->
|
|
|
|
|
<!-- https://github.com/pbatard/rufus/issues/1990 -->
|
|
|
|
|
<!-- https://learn.microsoft.com/windows/iot/iot-enterprise/Hardware/System_Requirements -->
|
2023-09-28 23:51:30 +08:00
|
|
|
|
<!-- <RunSynchronous>
|
2023-05-25 20:15:12 +08:00
|
|
|
|
<RunSynchronousCommand wcm:action="add">
|
|
|
|
|
<Order>1</Order>
|
2024-06-14 21:45:26 +08:00
|
|
|
|
<Path>cmd /c for %a in (RAM TPM SecureBoot) do reg add HKLM\SYSTEM\Setup\LabConfig /t REG_DWORD /v Bypass%aCheck /d 1 /f</Path>
|
2023-05-25 20:15:12 +08:00
|
|
|
|
</RunSynchronousCommand>
|
2023-09-28 23:51:30 +08:00
|
|
|
|
</RunSynchronous> -->
|
2023-05-25 20:15:12 +08:00
|
|
|
|
</component>
|
|
|
|
|
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="%arch%" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
|
|
|
<InputLocale>%locale%</InputLocale>
|
|
|
|
|
<SystemLocale>%locale%</SystemLocale>
|
|
|
|
|
<UILanguage>%locale%</UILanguage>
|
|
|
|
|
<UserLocale>%locale%</UserLocale>
|
|
|
|
|
</component>
|
2024-01-18 18:44:41 +08:00
|
|
|
|
</settings>
|
|
|
|
|
|
|
|
|
|
<!-- vultr win8/8.1/2012/2012r2 在 windowsPE/Microsoft-Windows-PnpCustomizationsWinPE 下载加载气球驱动
|
|
|
|
|
会出现 Windows Cannot find Microsoft software license terms 错误 -->
|
2024-01-27 23:17:50 +08:00
|
|
|
|
|
2024-01-18 18:44:41 +08:00
|
|
|
|
<settings pass="offlineServicing">
|
|
|
|
|
<component name="Microsoft-Windows-PnpCustomizationsNonWinPE" processorArchitecture="%arch%" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
2023-05-25 20:15:12 +08:00
|
|
|
|
<DriverPaths>
|
|
|
|
|
<PathAndCredentials wcm:action="add" wcm:keyValue="1">
|
2023-07-03 13:51:59 +08:00
|
|
|
|
<Path>X:\drivers</Path>
|
2023-05-25 20:15:12 +08:00
|
|
|
|
</PathAndCredentials>
|
|
|
|
|
</DriverPaths>
|
|
|
|
|
</component>
|
|
|
|
|
</settings>
|
2024-01-27 23:17:50 +08:00
|
|
|
|
|
2023-05-25 20:15:12 +08:00
|
|
|
|
<settings pass="specialize">
|
|
|
|
|
<component name="Microsoft-Windows-Deployment" processorArchitecture="%arch%" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
|
|
|
<RunSynchronous>
|
2023-07-06 21:54:09 +08:00
|
|
|
|
<!-- aws和华为云都要求设置为从不关闭显示器
|
2024-04-16 23:34:28 +08:00
|
|
|
|
https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/migrating-latest-types.html
|
2023-07-06 21:54:09 +08:00
|
|
|
|
https://support.huaweicloud.com/usermanual-ims/zh-cn_topic_0047501112.html -->
|
2023-05-25 20:15:12 +08:00
|
|
|
|
<RunSynchronousCommand wcm:action="add">
|
|
|
|
|
<Order>1</Order>
|
2023-07-06 21:54:09 +08:00
|
|
|
|
<Path>powercfg /setacvalueindex 381b4222-f694-41f0-9685-ff5bb260df2e 7516b95f-f776-4464-8c53-06167f40cc99 3c0bc021-c8a8-4e07-a973-6b14cbcb2b7e 0</Path>
|
|
|
|
|
</RunSynchronousCommand>
|
|
|
|
|
<RunSynchronousCommand wcm:action="add">
|
|
|
|
|
<Order>2</Order>
|
|
|
|
|
<Path>powercfg /setacvalueindex 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c 7516b95f-f776-4464-8c53-06167f40cc99 3c0bc021-c8a8-4e07-a973-6b14cbcb2b7e 0</Path>
|
|
|
|
|
</RunSynchronousCommand>
|
|
|
|
|
<RunSynchronousCommand wcm:action="add">
|
|
|
|
|
<Order>3</Order>
|
|
|
|
|
<Path>powercfg /setacvalueindex a1841308-3541-4fab-bc81-f71556f20b4a 7516b95f-f776-4464-8c53-06167f40cc99 3c0bc021-c8a8-4e07-a973-6b14cbcb2b7e 0</Path>
|
|
|
|
|
</RunSynchronousCommand>
|
|
|
|
|
<!-- 启用 administrator 账户 -->
|
|
|
|
|
<RunSynchronousCommand wcm:action="add">
|
|
|
|
|
<Order>4</Order>
|
2024-04-12 21:03:59 +08:00
|
|
|
|
<!-- vista 没有自带 powershell -->
|
|
|
|
|
<!-- <Path>powershell "$User = Get-WmiObject Win32_UserAccount | where SID -like *-500; $User.Disabled = $False; $User.Put()"</Path> -->
|
|
|
|
|
<!-- win7 此时无法用 wmic useraccount -->
|
|
|
|
|
<!-- <Path>wmic useraccount where "sid like '%-500'" set Disabled=false</Path> -->
|
|
|
|
|
<!-- https://learn.microsoft.com/archive/technet-wiki/13813.localized-names-for-administrator-account-in-windows -->
|
|
|
|
|
<Path>cmd /c "for %a in (Administrator Administrador Administrateur Administratör Администратор Järjestelmänvalvoja Rendszergazda) do (net user %a /active:yes && exit)"</Path>
|
2023-05-25 20:15:12 +08:00
|
|
|
|
</RunSynchronousCommand>
|
2024-05-29 21:30:20 +08:00
|
|
|
|
<!-- 禁用保留空间 -->
|
|
|
|
|
<RunSynchronousCommand wcm:action="add">
|
|
|
|
|
<Order>5</Order>
|
|
|
|
|
<Path>reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager /v ShippedWithReserves /t REG_DWORD /d 0 /f</Path>
|
|
|
|
|
<!-- 此时以下命令无效 -->
|
|
|
|
|
<!-- <Path>DISM /Online /Set-ReservedStorageState /State:Disabled</Path> -->
|
|
|
|
|
<!-- <Path>powershell "Set-WindowsReservedStorageState -State Disabled; exit"</Path> -->
|
|
|
|
|
</RunSynchronousCommand>
|
2023-11-02 23:53:15 +08:00
|
|
|
|
<!-- win7 在此阶段找不到网卡 -->
|
|
|
|
|
<!-- <RunSynchronousCommand wcm:action="add">
|
2023-07-06 21:54:09 +08:00
|
|
|
|
<Order>5</Order>
|
2023-10-22 18:43:54 +08:00
|
|
|
|
<Path>cmd /c "if exist %SystemDrive%\windows-resize.bat (call %SystemDrive%\windows-resize.bat)"</Path>
|
2023-05-25 20:15:12 +08:00
|
|
|
|
</RunSynchronousCommand>
|
2023-07-06 21:52:48 +08:00
|
|
|
|
<RunSynchronousCommand wcm:action="add">
|
2023-07-06 21:54:09 +08:00
|
|
|
|
<Order>6</Order>
|
2023-10-22 18:43:54 +08:00
|
|
|
|
<Path>cmd /c "if exist %SystemDrive%\windows-set-netconf.bat (call %SystemDrive%\windows-set-netconf.bat)"</Path>
|
2023-11-02 23:53:15 +08:00
|
|
|
|
</RunSynchronousCommand> -->
|
2023-05-25 20:15:12 +08:00
|
|
|
|
</RunSynchronous>
|
|
|
|
|
</component>
|
|
|
|
|
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="%arch%" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
|
|
|
<fDenyTSConnections>false</fDenyTSConnections>
|
|
|
|
|
</component>
|
|
|
|
|
<component name="Networking-MPSSVC-Svc" processorArchitecture="%arch%" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
|
|
|
<FirewallGroups>
|
|
|
|
|
<FirewallGroup wcm:action="add" wcm:keyValue="RemoteDesktop">
|
|
|
|
|
<Profile>all</Profile>
|
2024-10-12 23:07:01 +08:00
|
|
|
|
<!-- HKLM\System\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\FirewallRules -->
|
|
|
|
|
<!-- Get-NetFirewallRule | Where-Object Name -like 'RemoteDesktop*' | fl Name,DisplayName,Description,DisplayGroup,Group -->
|
|
|
|
|
<!-- https://learn.microsoft.com/windows-hardware/customize/desktop/unattend/networking-mpssvc-svc-firewallgroups-firewallgroup-group -->
|
2023-05-25 20:15:12 +08:00
|
|
|
|
<Group>@FirewallAPI.dll,-28752</Group>
|
2024-10-12 23:07:01 +08:00
|
|
|
|
<Active>%use_default_rdp_port%</Active>
|
2023-05-25 20:15:12 +08:00
|
|
|
|
</FirewallGroup>
|
|
|
|
|
</FirewallGroups>
|
|
|
|
|
</component>
|
|
|
|
|
<component name="Microsoft-Windows-powercpl" processorArchitecture="%arch%" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
|
|
|
<PreferredPlan>8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c</PreferredPlan>
|
|
|
|
|
</component>
|
2024-05-22 21:08:10 +08:00
|
|
|
|
<component name="Microsoft-Windows-ErrorReportingCore" processorArchitecture="%arch%" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
|
|
|
<DisableWER>1</DisableWER>
|
|
|
|
|
</component>
|
|
|
|
|
<component name="Microsoft-Windows-SQMApi" processorArchitecture="%arch%" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
|
|
|
<CEIPEnabled>0</CEIPEnabled>
|
|
|
|
|
</component>
|
2023-05-25 20:15:12 +08:00
|
|
|
|
</settings>
|
2024-01-27 23:17:50 +08:00
|
|
|
|
|
|
|
|
|
<settings pass="oobeSystem">
|
2024-06-03 21:44:36 +08:00
|
|
|
|
<!-- 好像不起作用 -->
|
|
|
|
|
<!-- <component name="Microsoft-Windows-WinRE-RecoveryAgent" processorArchitecture="%arch%" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
|
|
|
<UninstallWindowsRE>true</UninstallWindowsRE>
|
|
|
|
|
</component> -->
|
2024-01-27 23:17:50 +08:00
|
|
|
|
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="%arch%" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
|
|
|
<UserAccounts>
|
|
|
|
|
<AdministratorPassword>
|
2024-10-13 22:58:12 +08:00
|
|
|
|
<Value>%administrator_password%</Value>
|
|
|
|
|
<PlainText>false</PlainText>
|
2024-01-27 23:17:50 +08:00
|
|
|
|
</AdministratorPassword>
|
|
|
|
|
</UserAccounts>
|
|
|
|
|
<OOBE>
|
|
|
|
|
<HideEULAPage>true</HideEULAPage>
|
|
|
|
|
<ProtectYourPC>3</ProtectYourPC>
|
|
|
|
|
<SkipMachineOOBE>true</SkipMachineOOBE>
|
|
|
|
|
<SkipUserOOBE>true</SkipUserOOBE>
|
|
|
|
|
</OOBE>
|
2024-10-12 23:07:01 +08:00
|
|
|
|
<!-- 不设置时区,则使用镜像的默认时区 -->
|
|
|
|
|
<!-- <TimeZone>China Standard Time</TimeZone> -->
|
2024-01-27 23:17:50 +08:00
|
|
|
|
</component>
|
|
|
|
|
</settings>
|
2023-05-25 20:15:12 +08:00
|
|
|
|
</unattend>
|