VirtualBox

source: vbox/trunk/src/VBox/Main/UnattendedTemplates/win_nt6_unattended.xml@ 91531

最後變更 在這個檔案從91531是 91502,由 vboxsync 提交於 3 年 前

Main/Unattended: Add UEFI support (needed for Windows 11 which this also adds), and make it work for the Windows case. This requires moving the aux files to a DVD image, because Windows booted in UEFI mode is unable to access a legacy floppy drive (hardcoded by Microsoft). The partitioning needs to be very different with UEFI and follows Microsoft's recommendations. Needs also a bit more flexibility with knowing on which drive letter the script will end up. Additionally contains registry tweaking to skip the TPM and secure boot checks in the Windows 11 installer (just in Windows PE, for later upgrading the same needs to be applied in the final install).

  • 屬性 svn:eol-style 設為 CRLF
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 11.3 KB
 
1<?xml version="1.0" encoding="utf-8"?>
2<unattend xmlns="urn:schemas-microsoft-com:unattend"
3 xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
4
5 <settings pass="windowsPE">
6 <component name="Microsoft-Windows-International-Core-WinPE"
7 processorArchitecture="@@VBOX_INSERT_OS_ARCH_ATTRIB_DQ@@"
8 publicKeyToken="31bf3856ad364e35" language="neutral"
9 versionScope="nonSxS">
10 <InputLocale>en-US</InputLocale>
11 <SystemLocale>@@VBOX_INSERT_DASH_LOCALE@@</SystemLocale>
12 <UserLocale>@@VBOX_INSERT_DASH_LOCALE@@</UserLocale>
13 <!-- UILanguage must match the installation media language. Stuff like de-CH does not work for
14 example de_windows_7_enterprise_with_sp1_x64_dvd_u_677649.iso. However, stupidly we cannot
15 omit this element (kudos to brilliant minds at MS). -->
16 <UILanguage>@@VBOX_INSERT_LANGUAGE@@</UILanguage>
17 </component>
18
19 <component name="Microsoft-Windows-Setup"
20 processorArchitecture="@@VBOX_INSERT_OS_ARCH_ATTRIB_DQ@@"
21 publicKeyToken="31bf3856ad364e35" language="neutral"
22 versionScope="nonSxS">
23
24 <DiskConfiguration>
25 <WillShowUI>OnError</WillShowUI>
26 <Disk>
27 <DiskID>0</DiskID>
28 <WillWipeDisk>true</WillWipeDisk>
29@@VBOX_COND_IS_NOT_FIRMWARE_UEFI@@
30 <CreatePartitions>
31 <!-- TODO: Use the standard partitioning scheme at starting with Windows 8 maybe, using 2 partitions as described by Microsoft? -->
32 <CreatePartition>
33 <Order>1</Order>
34 <Type>Primary</Type>
35 <Extend>true</Extend>
36 </CreatePartition>
37 </CreatePartitions>
38@@VBOX_COND_END@@
39@@VBOX_COND_IS_FIRMWARE_UEFI@@
40 <CreatePartitions>
41 <CreatePartition wcm:action="add">
42 <Order>1</Order>
43 <Type>Primary</Type>
44 <Size>300</Size>
45 </CreatePartition>
46 <CreatePartition wcm:action="add">
47 <Order>2</Order>
48 <Type>EFI</Type>
49 <Size>100</Size>
50 </CreatePartition>
51 <CreatePartition wcm:action="add">
52 <Order>3</Order>
53 <Type>MSR</Type>
54 <Size>128</Size>
55 </CreatePartition>
56 <CreatePartition wcm:action="add">
57 <Order>4</Order>
58 <Type>Primary</Type>
59 <Extend>true</Extend>
60 </CreatePartition>
61 </CreatePartitions>
62 <ModifyPartitions>
63 <ModifyPartition wcm:action="add">
64 <Order>1</Order>
65 <PartitionID>1</PartitionID>
66 <Label>WINRE</Label>
67 <Format>NTFS</Format>
68 <TypeID>de94bba4-06d1-4d40-a16a-bfd50179d6ac</TypeID>
69 </ModifyPartition>
70 <ModifyPartition wcm:action="add">
71 <Order>2</Order>
72 <PartitionID>2</PartitionID>
73 <Label>EFI</Label>
74 <Format>FAT32</Format>
75 </ModifyPartition>
76 <ModifyPartition wcm:action="add">
77 <Order>3</Order>
78 <PartitionID>3</PartitionID>
79 </ModifyPartition>
80 <ModifyPartition wcm:action="add">
81 <Order>4</Order>
82 <PartitionID>4</PartitionID>
83 <Label>Windows</Label>
84 <Letter>C</Letter>
85 <Format>NTFS</Format>
86 </ModifyPartition>
87 </ModifyPartitions>
88@@VBOX_COND_END@@
89 </Disk>
90 </DiskConfiguration>
91
92 <UserData>
93 <ProductKey>
94 <Key>@@VBOX_INSERT_PRODUCT_KEY_ELEMENT@@</Key>
95 <WillShowUI>OnError</WillShowUI>
96 </ProductKey>
97 <AcceptEula>true</AcceptEula>
98 </UserData>
99
100 <ImageInstall>
101 <OSImage>
102 <InstallFrom>
103 <!-- TODO: This stuff doesn't work for en_windows_vista_enterprise_sp1_x64_and_x86.iso ... -->
104 <MetaData wcm:action="add">
105 <Key>/IMAGE/INDEX</Key>
106 <Value>@@VBOX_INSERT_IMAGE_INDEX_ELEMENT@@</Value>
107 </MetaData>
108 <!-- <Path>d:\sources\install.wim</Path> - the w7 tests doesn't specify this -->
109 </InstallFrom>
110 <InstallTo>
111 <DiskID>0</DiskID>
112@@VBOX_COND_IS_NOT_FIRMWARE_UEFI@@
113 <PartitionID>1</PartitionID>
114@@VBOX_COND_END@@
115@@VBOX_COND_IS_FIRMWARE_UEFI@@
116 <PartitionID>4</PartitionID>
117@@VBOX_COND_END@@
118 </InstallTo>
119 <WillShowUI>OnError</WillShowUI>
120 <InstallToAvailablePartition>false</InstallToAvailablePartition>
121 </OSImage>
122 </ImageInstall>
123
124 <ComplianceCheck>
125 <DisplayReport>OnError</DisplayReport>
126 </ComplianceCheck>
127
128 <!-- Apply registry tweaks to Windows PE, skipping the checks in the Windows 11 setup program. This will not make it to the final install, and should do no harm with older Windows versions. -->
129 <RunAsynchronous>
130 <RunAsynchronousCommand>
131 <Order>1</Order>
132 <Path>reg.exe add HKEY_LOCAL_MACHINE\SYSTEM\Setup\LabConfig /v BypassCPUCheck /t REG_DWORD /d 1</Path>
133 <Description>Windows 11 disable CPU check</Description>
134 </RunAsynchronousCommand>
135 <RunAsynchronousCommand>
136 <Order>2</Order>
137 <Path>reg.exe add HKEY_LOCAL_MACHINE\SYSTEM\Setup\LabConfig /v BypassRAMCheck /t REG_DWORD /d 1</Path>
138 <Description>Windows 11 disable RAM check</Description>
139 </RunAsynchronousCommand>
140 <RunAsynchronousCommand>
141 <Order>3</Order>
142 <Path>reg.exe add HKEY_LOCAL_MACHINE\SYSTEM\Setup\LabConfig /v BypassSecureBootCheck /t REG_DWORD /d 1</Path>
143 <Description>Windows 11 disable Secure Boot check</Description>
144 </RunAsynchronousCommand>
145 <RunAsynchronousCommand>
146 <Order>4</Order>
147 <Path>reg.exe add HKEY_LOCAL_MACHINE\SYSTEM\Setup\LabConfig /v BypassStorageCheck /t REG_DWORD /d 1</Path>
148 <Description>Windows 11 disable Storage check</Description>
149 </RunAsynchronousCommand>
150 <RunAsynchronousCommand>
151 <Order>5</Order>
152 <Path>reg.exe add HKEY_LOCAL_MACHINE\SYSTEM\Setup\LabConfig /v BypassTPMCheck /t REG_DWORD /d 1</Path>
153 <Description>Windows 11 disable TPM check</Description>
154 </RunAsynchronousCommand>
155 </RunAsynchronous>
156
157 </component>
158 </settings>
159
160 <settings pass="specialize">
161 <component name="Microsoft-Windows-Shell-Setup"
162 processorArchitecture="@@VBOX_INSERT_OS_ARCH_ATTRIB_DQ@@"
163 publicKeyToken="31bf3856ad364e35" language="neutral"
164 versionScope="nonSxS">
165 <ComputerName>@@VBOX_INSERT_HOSTNAME_WITHOUT_DOMAIN_MAX_15@@</ComputerName>
166 </component>
167 </settings>
168
169 <settings pass="oobeSystem">
170 <component name="Microsoft-Windows-Shell-Setup"
171 processorArchitecture="@@VBOX_INSERT_OS_ARCH_ATTRIB_DQ@@"
172 publicKeyToken="31bf3856ad364e35" language="neutral"
173 versionScope="nonSxS">
174 <AutoLogon>
175 <Password>
176 <Value>@@VBOX_INSERT_USER_PASSWORD_ELEMENT@@</Value>
177 <PlainText>true</PlainText>
178 </Password>
179 <Enabled>true</Enabled>
180 <Username>@@VBOX_INSERT_USER_LOGIN_ELEMENT@@</Username>
181 </AutoLogon>
182
183 <UserAccounts>
184@@VBOX_COND_IS_USER_LOGIN_NOT_ADMINISTRATOR@@
185 <AdministratorPassword>
186 <Value>@@VBOX_INSERT_ROOT_PASSWORD_ELEMENT@@</Value>
187 <PlainText>true</PlainText>
188 </AdministratorPassword>
189
190 <LocalAccounts>
191 <LocalAccount wcm:action="add">
192 <Name>@@VBOX_INSERT_USER_LOGIN_ELEMENT@@</Name>
193 <DisplayName>@@VBOX_INSERT_USER_FULL_NAME_ELEMENT@@</DisplayName>
194 <Group>administrators;users</Group>
195 <Password>
196 <Value>@@VBOX_INSERT_USER_PASSWORD_ELEMENT@@</Value>
197 <PlainText>true</PlainText>
198 </Password>
199 </LocalAccount>
200 </LocalAccounts>
201@@VBOX_COND_END@@
202@@VBOX_COND_IS_USER_LOGIN_ADMINISTRATOR@@
203 <AdministratorPassword>
204 <Value>@@VBOX_INSERT_USER_PASSWORD_ELEMENT@@</Value>
205 <PlainText>true</PlainText>
206 </AdministratorPassword>
207@@VBOX_COND_END@@
208 </UserAccounts>
209
210 <VisualEffects>
211 <FontSmoothing>ClearType</FontSmoothing>
212 </VisualEffects>
213
214 <OOBE>
215 <ProtectYourPC>3</ProtectYourPC>
216 <HideEULAPage>true</HideEULAPage>
217 <SkipUserOOBE>true</SkipUserOOBE>
218 <SkipMachineOOBE>true</SkipMachineOOBE>
219 <!-- Make this (NetworkLocation) default to public and make it configurable -->
220 <NetworkLocation>Home</NetworkLocation>
221 </OOBE>
222
223 <FirstLogonCommands>
224 <SynchronousCommand wcm:action="add">
225 <!-- For which OS versions do we need to do this? -->
226 <Order>1</Order>
227 <Description>Turn Off Network Selection pop-up</Description>
228 <CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Network\NewNetworkWindowOff"</CommandLine>
229 </SynchronousCommand>
230 <SynchronousCommand wcm:action="add">
231 <Order>2</Order>
232 <Description>VirtualBox post guest install steps </Description>
233 <CommandLine>cmd.exe /c @@VBOX_INSERT_AUXILIARY_INSTALL_DIR@@VBOXPOST.CMD --vista-or-newer</CommandLine>
234 </SynchronousCommand>
235 </FirstLogonCommands>
236
237 <TimeZone>@@VBOX_INSERT_TIME_ZONE_WIN_NAME@@</TimeZone>
238 </component>
239
240 </settings>
241</unattend>
242
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette