feat: Support more Windows versions (#92)
This commit is contained in:
parent
82ad512dca
commit
44c6b9989b
@ -170,6 +170,21 @@
|
|||||||
</OEMInformation>
|
</OEMInformation>
|
||||||
<OEMName>Windows for Docker</OEMName>
|
<OEMName>Windows for Docker</OEMName>
|
||||||
</component>
|
</component>
|
||||||
|
<component name="Microsoft-Windows-ErrorReportingCore" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DisableWER>1</DisableWER>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DisableAccelerators>true</DisableAccelerators>
|
||||||
|
<DisableFirstRunWizard>true</DisableFirstRunWizard>
|
||||||
|
<Home_Page>about:blank</Home_Page>
|
||||||
|
<Help_Page>about:blank</Help_Page>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="wow64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DisableAccelerators>true</DisableAccelerators>
|
||||||
|
<DisableFirstRunWizard>true</DisableFirstRunWizard>
|
||||||
|
<Home_Page>about:blank</Home_Page>
|
||||||
|
<Help_Page>about:blank</Help_Page>
|
||||||
|
</component>
|
||||||
<component name="Microsoft-Windows-SQMApi" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
<component name="Microsoft-Windows-SQMApi" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
<CEIPEnabled>0</CEIPEnabled>
|
<CEIPEnabled>0</CEIPEnabled>
|
||||||
</component>
|
</component>
|
||||||
@ -307,7 +322,7 @@
|
|||||||
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
|
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
|
||||||
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
|
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
|
||||||
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
||||||
<NetworkLocation>Home</NetworkLocation>
|
<NetworkLocation>Other</NetworkLocation>
|
||||||
<ProtectYourPC>3</ProtectYourPC>
|
<ProtectYourPC>3</ProtectYourPC>
|
||||||
<SkipUserOOBE>true</SkipUserOOBE>
|
<SkipUserOOBE>true</SkipUserOOBE>
|
||||||
<SkipMachineOOBE>true</SkipMachineOOBE>
|
<SkipMachineOOBE>true</SkipMachineOOBE>
|
||||||
|
@ -188,6 +188,21 @@
|
|||||||
</OEMInformation>
|
</OEMInformation>
|
||||||
<OEMName>Windows for Docker</OEMName>
|
<OEMName>Windows for Docker</OEMName>
|
||||||
</component>
|
</component>
|
||||||
|
<component name="Microsoft-Windows-ErrorReportingCore" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DisableWER>1</DisableWER>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DisableAccelerators>true</DisableAccelerators>
|
||||||
|
<DisableFirstRunWizard>true</DisableFirstRunWizard>
|
||||||
|
<Home_Page>about:blank</Home_Page>
|
||||||
|
<Help_Page>about:blank</Help_Page>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="wow64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DisableAccelerators>true</DisableAccelerators>
|
||||||
|
<DisableFirstRunWizard>true</DisableFirstRunWizard>
|
||||||
|
<Home_Page>about:blank</Home_Page>
|
||||||
|
<Help_Page>about:blank</Help_Page>
|
||||||
|
</component>
|
||||||
<component name="Microsoft-Windows-SQMApi" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
<component name="Microsoft-Windows-SQMApi" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
<CEIPEnabled>0</CEIPEnabled>
|
<CEIPEnabled>0</CEIPEnabled>
|
||||||
</component>
|
</component>
|
||||||
@ -325,7 +340,7 @@
|
|||||||
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
|
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
|
||||||
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
|
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
|
||||||
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
||||||
<NetworkLocation>Home</NetworkLocation>
|
<NetworkLocation>Other</NetworkLocation>
|
||||||
<ProtectYourPC>3</ProtectYourPC>
|
<ProtectYourPC>3</ProtectYourPC>
|
||||||
<SkipUserOOBE>true</SkipUserOOBE>
|
<SkipUserOOBE>true</SkipUserOOBE>
|
||||||
<SkipMachineOOBE>true</SkipMachineOOBE>
|
<SkipMachineOOBE>true</SkipMachineOOBE>
|
||||||
|
@ -172,6 +172,21 @@
|
|||||||
</OEMInformation>
|
</OEMInformation>
|
||||||
<OEMName>Windows for Docker</OEMName>
|
<OEMName>Windows for Docker</OEMName>
|
||||||
</component>
|
</component>
|
||||||
|
<component name="Microsoft-Windows-ErrorReportingCore" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DisableWER>1</DisableWER>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DisableAccelerators>true</DisableAccelerators>
|
||||||
|
<DisableFirstRunWizard>true</DisableFirstRunWizard>
|
||||||
|
<Home_Page>about:blank</Home_Page>
|
||||||
|
<Help_Page>about:blank</Help_Page>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="wow64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DisableAccelerators>true</DisableAccelerators>
|
||||||
|
<DisableFirstRunWizard>true</DisableFirstRunWizard>
|
||||||
|
<Home_Page>about:blank</Home_Page>
|
||||||
|
<Help_Page>about:blank</Help_Page>
|
||||||
|
</component>
|
||||||
<component name="Microsoft-Windows-SQMApi" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
<component name="Microsoft-Windows-SQMApi" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
<CEIPEnabled>0</CEIPEnabled>
|
<CEIPEnabled>0</CEIPEnabled>
|
||||||
</component>
|
</component>
|
||||||
@ -237,7 +252,7 @@
|
|||||||
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
|
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
|
||||||
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
|
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
|
||||||
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
||||||
<NetworkLocation>Home</NetworkLocation>
|
<NetworkLocation>Other</NetworkLocation>
|
||||||
<ProtectYourPC>3</ProtectYourPC>
|
<ProtectYourPC>3</ProtectYourPC>
|
||||||
<SkipUserOOBE>true</SkipUserOOBE>
|
<SkipUserOOBE>true</SkipUserOOBE>
|
||||||
<SkipMachineOOBE>true</SkipMachineOOBE>
|
<SkipMachineOOBE>true</SkipMachineOOBE>
|
||||||
|
@ -176,6 +176,21 @@
|
|||||||
</OEMInformation>
|
</OEMInformation>
|
||||||
<OEMName>Windows for Docker</OEMName>
|
<OEMName>Windows for Docker</OEMName>
|
||||||
</component>
|
</component>
|
||||||
|
<component name="Microsoft-Windows-ErrorReportingCore" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DisableWER>1</DisableWER>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DisableAccelerators>true</DisableAccelerators>
|
||||||
|
<DisableFirstRunWizard>true</DisableFirstRunWizard>
|
||||||
|
<Home_Page>about:blank</Home_Page>
|
||||||
|
<Help_Page>about:blank</Help_Page>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="wow64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DisableAccelerators>true</DisableAccelerators>
|
||||||
|
<DisableFirstRunWizard>true</DisableFirstRunWizard>
|
||||||
|
<Home_Page>about:blank</Home_Page>
|
||||||
|
<Help_Page>about:blank</Help_Page>
|
||||||
|
</component>
|
||||||
<component name="Microsoft-Windows-SQMApi" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
<component name="Microsoft-Windows-SQMApi" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
<CEIPEnabled>0</CEIPEnabled>
|
<CEIPEnabled>0</CEIPEnabled>
|
||||||
</component>
|
</component>
|
||||||
@ -241,7 +256,7 @@
|
|||||||
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
|
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
|
||||||
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
|
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
|
||||||
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
||||||
<NetworkLocation>Home</NetworkLocation>
|
<NetworkLocation>Other</NetworkLocation>
|
||||||
<ProtectYourPC>3</ProtectYourPC>
|
<ProtectYourPC>3</ProtectYourPC>
|
||||||
<SkipUserOOBE>true</SkipUserOOBE>
|
<SkipUserOOBE>true</SkipUserOOBE>
|
||||||
<SkipMachineOOBE>true</SkipMachineOOBE>
|
<SkipMachineOOBE>true</SkipMachineOOBE>
|
||||||
|
@ -176,6 +176,21 @@
|
|||||||
</OEMInformation>
|
</OEMInformation>
|
||||||
<OEMName>Windows for Docker</OEMName>
|
<OEMName>Windows for Docker</OEMName>
|
||||||
</component>
|
</component>
|
||||||
|
<component name="Microsoft-Windows-ErrorReportingCore" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DisableWER>1</DisableWER>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DisableAccelerators>true</DisableAccelerators>
|
||||||
|
<DisableFirstRunWizard>true</DisableFirstRunWizard>
|
||||||
|
<Home_Page>about:blank</Home_Page>
|
||||||
|
<Help_Page>about:blank</Help_Page>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="wow64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DisableAccelerators>true</DisableAccelerators>
|
||||||
|
<DisableFirstRunWizard>true</DisableFirstRunWizard>
|
||||||
|
<Home_Page>about:blank</Home_Page>
|
||||||
|
<Help_Page>about:blank</Help_Page>
|
||||||
|
</component>
|
||||||
<component name="Microsoft-Windows-SQMApi" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
<component name="Microsoft-Windows-SQMApi" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
<CEIPEnabled>0</CEIPEnabled>
|
<CEIPEnabled>0</CEIPEnabled>
|
||||||
</component>
|
</component>
|
||||||
@ -241,7 +256,7 @@
|
|||||||
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
|
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
|
||||||
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
|
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
|
||||||
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
||||||
<NetworkLocation>Home</NetworkLocation>
|
<NetworkLocation>Other</NetworkLocation>
|
||||||
<ProtectYourPC>3</ProtectYourPC>
|
<ProtectYourPC>3</ProtectYourPC>
|
||||||
<SkipUserOOBE>true</SkipUserOOBE>
|
<SkipUserOOBE>true</SkipUserOOBE>
|
||||||
<SkipMachineOOBE>true</SkipMachineOOBE>
|
<SkipMachineOOBE>true</SkipMachineOOBE>
|
||||||
|
222
assets/win7x64-ultimate.xml
Normal file
222
assets/win7x64-ultimate.xml
Normal file
@ -0,0 +1,222 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
|
||||||
|
<settings pass="windowsPE">
|
||||||
|
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<SetupUILanguage>
|
||||||
|
<UILanguage>en-US</UILanguage>
|
||||||
|
</SetupUILanguage>
|
||||||
|
<InputLocale>0409:00000409</InputLocale>
|
||||||
|
<SystemLocale>en-US</SystemLocale>
|
||||||
|
<UILanguage>en-US</UILanguage>
|
||||||
|
<UserLocale>en-US</UserLocale>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DiskConfiguration>
|
||||||
|
<WillShowUI>OnError</WillShowUI>
|
||||||
|
<Disk wcm:action="add">
|
||||||
|
<DiskID>0</DiskID>
|
||||||
|
<WillWipeDisk>true</WillWipeDisk>
|
||||||
|
<CreatePartitions>
|
||||||
|
<CreatePartition wcm:action="add">
|
||||||
|
<Order>1</Order>
|
||||||
|
<Type>Primary</Type>
|
||||||
|
<Size>100</Size>
|
||||||
|
</CreatePartition>
|
||||||
|
<CreatePartition wcm:action="add">
|
||||||
|
<Order>2</Order>
|
||||||
|
<Type>Primary</Type>
|
||||||
|
<Extend>true</Extend>
|
||||||
|
</CreatePartition>
|
||||||
|
</CreatePartitions>
|
||||||
|
<ModifyPartitions>
|
||||||
|
<ModifyPartition wcm:action="add">
|
||||||
|
<Format>NTFS</Format>
|
||||||
|
<Label>System Reserved</Label>
|
||||||
|
<Order>1</Order>
|
||||||
|
<Active>true</Active>
|
||||||
|
<PartitionID>1</PartitionID>
|
||||||
|
<TypeID>0x27</TypeID>
|
||||||
|
</ModifyPartition>
|
||||||
|
<ModifyPartition wcm:action="add">
|
||||||
|
<Active>true</Active>
|
||||||
|
<Format>NTFS</Format>
|
||||||
|
<Label>Windows</Label>
|
||||||
|
<Letter>C</Letter>
|
||||||
|
<Order>2</Order>
|
||||||
|
<PartitionID>2</PartitionID>
|
||||||
|
</ModifyPartition>
|
||||||
|
</ModifyPartitions>
|
||||||
|
</Disk>
|
||||||
|
</DiskConfiguration>
|
||||||
|
<ImageInstall>
|
||||||
|
<OSImage>
|
||||||
|
<InstallFrom>
|
||||||
|
<MetaData wcm:action="add">
|
||||||
|
<Key>/IMAGE/INDEX</Key>
|
||||||
|
<Value>1</Value>
|
||||||
|
</MetaData>
|
||||||
|
</InstallFrom>
|
||||||
|
<InstallTo>
|
||||||
|
<DiskID>0</DiskID>
|
||||||
|
<PartitionID>2</PartitionID>
|
||||||
|
</InstallTo>
|
||||||
|
<InstallToAvailablePartition>false</InstallToAvailablePartition>
|
||||||
|
</OSImage>
|
||||||
|
</ImageInstall>
|
||||||
|
<DynamicUpdate>
|
||||||
|
<Enable>true</Enable>
|
||||||
|
<WillShowUI>Never</WillShowUI>
|
||||||
|
</DynamicUpdate>
|
||||||
|
<UpgradeData>
|
||||||
|
<Upgrade>false</Upgrade>
|
||||||
|
<WillShowUI>Never</WillShowUI>
|
||||||
|
</UpgradeData>
|
||||||
|
<UserData>
|
||||||
|
<AcceptEula>true</AcceptEula>
|
||||||
|
<FullName>Docker</FullName>
|
||||||
|
<Organization>Windows for Docker</Organization>
|
||||||
|
<ProductKey>
|
||||||
|
<Key>D4F6K-QK3RD-TMVMJ-BBMRX-3MBMV</Key>
|
||||||
|
<WillShowUI>OnError</WillShowUI>
|
||||||
|
</ProductKey>
|
||||||
|
</UserData>
|
||||||
|
<EnableFirewall>false</EnableFirewall>
|
||||||
|
<Diagnostics>
|
||||||
|
<OptIn>false</OptIn>
|
||||||
|
</Diagnostics>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DriverPaths>
|
||||||
|
<PathAndCredentials wcm:action="add" wcm:keyValue="1">
|
||||||
|
<Path>D:\viostor\w7\amd64</Path>
|
||||||
|
</PathAndCredentials>
|
||||||
|
<PathAndCredentials wcm:action="add" wcm:keyValue="2">
|
||||||
|
<Path>D:\NetKVM\w7\amd64</Path>
|
||||||
|
</PathAndCredentials>
|
||||||
|
<PathAndCredentials wcm:action="add" wcm:keyValue="3">
|
||||||
|
<Path>D:\Balloon\w7\amd64</Path>
|
||||||
|
</PathAndCredentials>
|
||||||
|
<PathAndCredentials wcm:action="add" wcm:keyValue="4">
|
||||||
|
<Path>D:\pvpanic\w7\amd64</Path>
|
||||||
|
</PathAndCredentials>
|
||||||
|
<PathAndCredentials wcm:action="add" wcm:keyValue="5">
|
||||||
|
<Path>D:\qemupciserial\w7\amd64</Path>
|
||||||
|
</PathAndCredentials>
|
||||||
|
<PathAndCredentials wcm:action="add" wcm:keyValue="6">
|
||||||
|
<Path>D:\qxldod\w7\amd64</Path>
|
||||||
|
</PathAndCredentials>
|
||||||
|
<PathAndCredentials wcm:action="add" wcm:keyValue="7">
|
||||||
|
<Path>D:\vioinput\w7\amd64</Path>
|
||||||
|
</PathAndCredentials>
|
||||||
|
<PathAndCredentials wcm:action="add" wcm:keyValue="8">
|
||||||
|
<Path>D:\viorng\w7\amd64</Path>
|
||||||
|
</PathAndCredentials>
|
||||||
|
<PathAndCredentials wcm:action="add" wcm:keyValue="9">
|
||||||
|
<Path>D:\vioscsi\w7\amd64</Path>
|
||||||
|
</PathAndCredentials>
|
||||||
|
<PathAndCredentials wcm:action="add" wcm:keyValue="10">
|
||||||
|
<Path>D:\vioserial\w7\amd64</Path>
|
||||||
|
</PathAndCredentials>
|
||||||
|
</DriverPaths>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
<settings pass="offlineServicing">
|
||||||
|
<component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<EnableLUA>false</EnableLUA>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<ComputerName>*</ComputerName>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
<settings pass="generalize">
|
||||||
|
<component name="Microsoft-Windows-PnPSysprep" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<PersistAllDeviceInstalls>true</PersistAllDeviceInstalls>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-Security-SPP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<SkipRearm>1</SkipRearm>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
<settings pass="specialize">
|
||||||
|
<component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<SkipAutoActivation>true</SkipAutoActivation>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-ErrorReportingCore" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DisableWER>1</DisableWER>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DisableAccelerators>true</DisableAccelerators>
|
||||||
|
<DisableFirstRunWizard>true</DisableFirstRunWizard>
|
||||||
|
<Home_Page>about:blank</Home_Page>
|
||||||
|
<Help_Page>about:blank</Help_Page>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="wow64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DisableAccelerators>true</DisableAccelerators>
|
||||||
|
<DisableFirstRunWizard>true</DisableFirstRunWizard>
|
||||||
|
<Home_Page>about:blank</Home_Page>
|
||||||
|
<Help_Page>about:blank</Help_Page>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-SQMApi" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<CEIPEnabled>0</CEIPEnabled>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<InputLocale>0409:00000409</InputLocale>
|
||||||
|
<SystemLocale>en-US</SystemLocale>
|
||||||
|
<UILanguage>en-US</UILanguage>
|
||||||
|
<UserLocale>en-US</UserLocale>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
<settings pass="oobeSystem">
|
||||||
|
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<UserAccounts>
|
||||||
|
<LocalAccounts>
|
||||||
|
<LocalAccount wcm:action="add">
|
||||||
|
<Name>Docker</Name>
|
||||||
|
<Group>Administrators</Group>
|
||||||
|
<Password>
|
||||||
|
<Value />
|
||||||
|
<PlainText>true</PlainText>
|
||||||
|
</Password>
|
||||||
|
</LocalAccount>
|
||||||
|
</LocalAccounts>
|
||||||
|
<AdministratorPassword>
|
||||||
|
<Value>password</Value>
|
||||||
|
<PlainText>true</PlainText>
|
||||||
|
</AdministratorPassword>
|
||||||
|
</UserAccounts>
|
||||||
|
<AutoLogon>
|
||||||
|
<Username>Docker</Username>
|
||||||
|
<Enabled>true</Enabled>
|
||||||
|
<LogonCount>1</LogonCount>
|
||||||
|
<Password>
|
||||||
|
<Value />
|
||||||
|
<PlainText>true</PlainText>
|
||||||
|
</Password>
|
||||||
|
</AutoLogon>
|
||||||
|
<OOBE>
|
||||||
|
<HideEULAPage>true</HideEULAPage>
|
||||||
|
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
||||||
|
<NetworkLocation>Other</NetworkLocation>
|
||||||
|
<ProtectYourPC>3</ProtectYourPC>
|
||||||
|
<SkipUserOOBE>true</SkipUserOOBE>
|
||||||
|
<SkipMachineOOBE>true</SkipMachineOOBE>
|
||||||
|
</OOBE>
|
||||||
|
<FirstLogonCommands>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>1</Order>
|
||||||
|
<CommandLine>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
|
<Description>Set AutoLogonCount to 0</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>2</Order>
|
||||||
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /v LimitBlankPasswordUse /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
|
<Description>Allow RDP login with blank password</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>3</Order>
|
||||||
|
<CommandLine>cmd /C POWERCFG -H OFF</CommandLine>
|
||||||
|
<Description>Disable Hibernation</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
</FirstLogonCommands>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
</unattend>
|
@ -173,6 +173,21 @@
|
|||||||
</OEMInformation>
|
</OEMInformation>
|
||||||
<OEMName>Windows for Docker</OEMName>
|
<OEMName>Windows for Docker</OEMName>
|
||||||
</component>
|
</component>
|
||||||
|
<component name="Microsoft-Windows-ErrorReportingCore" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DisableWER>1</DisableWER>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DisableAccelerators>true</DisableAccelerators>
|
||||||
|
<DisableFirstRunWizard>true</DisableFirstRunWizard>
|
||||||
|
<Home_Page>about:blank</Home_Page>
|
||||||
|
<Help_Page>about:blank</Help_Page>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="wow64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DisableAccelerators>true</DisableAccelerators>
|
||||||
|
<DisableFirstRunWizard>true</DisableFirstRunWizard>
|
||||||
|
<Home_Page>about:blank</Home_Page>
|
||||||
|
<Help_Page>about:blank</Help_Page>
|
||||||
|
</component>
|
||||||
<component name="Microsoft-Windows-SQMApi" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
<component name="Microsoft-Windows-SQMApi" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
<CEIPEnabled>0</CEIPEnabled>
|
<CEIPEnabled>0</CEIPEnabled>
|
||||||
</component>
|
</component>
|
||||||
@ -216,7 +231,7 @@
|
|||||||
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
|
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
|
||||||
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
|
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
|
||||||
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
||||||
<NetworkLocation>Home</NetworkLocation>
|
<NetworkLocation>Other</NetworkLocation>
|
||||||
<ProtectYourPC>3</ProtectYourPC>
|
<ProtectYourPC>3</ProtectYourPC>
|
||||||
<SkipUserOOBE>true</SkipUserOOBE>
|
<SkipUserOOBE>true</SkipUserOOBE>
|
||||||
<SkipMachineOOBE>true</SkipMachineOOBE>
|
<SkipMachineOOBE>true</SkipMachineOOBE>
|
||||||
|
@ -81,6 +81,8 @@ docker run -it --rm -p 8006:8006 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti
|
|||||||
- ```win22``` = Windows Server 2022
|
- ```win22``` = Windows Server 2022
|
||||||
- ```win19``` = Windows Server 2019
|
- ```win19``` = Windows Server 2019
|
||||||
- ```win16``` = Windows Server 2016
|
- ```win16``` = Windows Server 2016
|
||||||
|
- ```tiny11``` = Tiny 11 (Slow download)
|
||||||
|
- ```win7``` = Windows 7 (Slow download)
|
||||||
|
|
||||||
* ### How do I increase the amount of CPU or RAM?
|
* ### How do I increase the amount of CPU or RAM?
|
||||||
|
|
||||||
|
195
src/install.sh
195
src/install.sh
@ -20,6 +20,10 @@ fi
|
|||||||
[[ "${VERSION,,}" == "win81" ]] && VERSION="win81x64"
|
[[ "${VERSION,,}" == "win81" ]] && VERSION="win81x64"
|
||||||
[[ "${VERSION,,}" == "win8" ]] && VERSION="win81x64"
|
[[ "${VERSION,,}" == "win8" ]] && VERSION="win81x64"
|
||||||
|
|
||||||
|
[[ "${VERSION,,}" == "7" ]] && VERSION="win7x64-ultimate"
|
||||||
|
[[ "${VERSION,,}" == "win7" ]] && VERSION="win7x64-ultimate"
|
||||||
|
[[ "${VERSION,,}" == "win7x64" ]] && VERSION="win7x64-ultimate"
|
||||||
|
|
||||||
[[ "${VERSION,,}" == "22" ]] && VERSION="win2022-eval"
|
[[ "${VERSION,,}" == "22" ]] && VERSION="win2022-eval"
|
||||||
[[ "${VERSION,,}" == "2022" ]] && VERSION="win2022-eval"
|
[[ "${VERSION,,}" == "2022" ]] && VERSION="win2022-eval"
|
||||||
[[ "${VERSION,,}" == "win22" ]] && VERSION="win2022-eval"
|
[[ "${VERSION,,}" == "win22" ]] && VERSION="win2022-eval"
|
||||||
@ -35,6 +39,10 @@ fi
|
|||||||
[[ "${VERSION,,}" == "win16" ]] && VERSION="win2016-eval"
|
[[ "${VERSION,,}" == "win16" ]] && VERSION="win2016-eval"
|
||||||
[[ "${VERSION,,}" == "win2016" ]] && VERSION="win2016-eval"
|
[[ "${VERSION,,}" == "win2016" ]] && VERSION="win2016-eval"
|
||||||
|
|
||||||
|
if [[ "${VERSION,,}" == "tiny11" ]]; then
|
||||||
|
VERSION="https://archive.org/download/tiny-11-core-x-64-beta-1/tiny11%20core%20x64%20beta%201.iso"
|
||||||
|
fi
|
||||||
|
|
||||||
CUSTOM="custom.iso"
|
CUSTOM="custom.iso"
|
||||||
|
|
||||||
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="Custom.iso"
|
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="Custom.iso"
|
||||||
@ -106,10 +114,28 @@ finishInstall() {
|
|||||||
rm -f "$STORAGE/windows.boot"
|
rm -f "$STORAGE/windows.boot"
|
||||||
cp /run/version "$STORAGE/windows.ver"
|
cp /run/version "$STORAGE/windows.ver"
|
||||||
|
|
||||||
|
if [[ "${BOOT_MODE,,}" == "windows_legacy" ]]; then
|
||||||
|
touch "$STORAGE/windows.old"
|
||||||
|
else
|
||||||
|
rm -f "$STORAGE/windows.old"
|
||||||
|
fi
|
||||||
|
|
||||||
rm -rf "$TMP"
|
rm -rf "$TMP"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
abortInstall() {
|
||||||
|
|
||||||
|
local iso="$1"
|
||||||
|
|
||||||
|
if [[ "$iso" != "$STORAGE/$BASE" ]]; then
|
||||||
|
mv -f "$iso" "$STORAGE/$BASE"
|
||||||
|
fi
|
||||||
|
|
||||||
|
finishInstall "$STORAGE/$BASE"
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
startInstall() {
|
startInstall() {
|
||||||
|
|
||||||
local magic
|
local magic
|
||||||
@ -207,12 +233,13 @@ downloadImage() {
|
|||||||
if [[ "$EXTERNAL" != [Yy1]* ]]; then
|
if [[ "$EXTERNAL" != [Yy1]* ]]; then
|
||||||
|
|
||||||
cd "$TMP"
|
cd "$TMP"
|
||||||
/run/mido.sh "$url"
|
if ! /run/mido.sh "$url"; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
cd /run
|
cd /run
|
||||||
|
|
||||||
[ ! -f "$iso" ] && error "Failed to download $url" && exit 61
|
[ ! -f "$iso" ] && return 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
info "Downloading $BASE as boot image..."
|
info "Downloading $BASE as boot image..."
|
||||||
@ -225,10 +252,9 @@ downloadImage() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
{ wget "$url" -O "$iso" -q --no-check-certificate --show-progress "$progress"; rc=$?; } || :
|
{ wget "$url" -O "$iso" -q --no-check-certificate --show-progress "$progress"; rc=$?; } || :
|
||||||
|
|
||||||
(( rc != 0 )) && error "Failed to download $url, reason: $rc" && exit 60
|
(( rc != 0 )) && error "Failed to download $url, reason: $rc" && exit 60
|
||||||
[ ! -f "$iso" ] && error "Failed to download $url" && exit 61
|
|
||||||
|
|
||||||
|
[ ! -f "$iso" ] && return 1
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -256,7 +282,11 @@ extractImage() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf "$dir"
|
rm -rf "$dir"
|
||||||
7z x "$iso" -o"$dir" > /dev/null
|
|
||||||
|
if ! 7z x "$iso" -o"$dir" > /dev/null; then
|
||||||
|
error "Failed to extract ISO file!"
|
||||||
|
exit 66
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -f "$dir/$ETFS" ] || [ ! -f "$dir/$EFISYS" ]; then
|
if [ ! -f "$dir/$ETFS" ] || [ ! -f "$dir/$EFISYS" ]; then
|
||||||
|
|
||||||
@ -266,11 +296,10 @@ extractImage() {
|
|||||||
warn "failed to locate file 'efisys_noprompt.bin' in ISO image, $FB"
|
warn "failed to locate file 'efisys_noprompt.bin' in ISO image, $FB"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
BOOT_MODE="windows_legacy"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -z "$CUSTOM" ] && rm -f "$iso"
|
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -285,22 +314,30 @@ findVersion() {
|
|||||||
[[ "${name,,}" == *"server 2022"* ]] && detected="win2022-eval"
|
[[ "${name,,}" == *"server 2022"* ]] && detected="win2022-eval"
|
||||||
[[ "${name,,}" == *"server 2019"* ]] && detected="win2019-eval"
|
[[ "${name,,}" == *"server 2019"* ]] && detected="win2019-eval"
|
||||||
[[ "${name,,}" == *"server 2016"* ]] && detected="win2016-eval"
|
[[ "${name,,}" == *"server 2016"* ]] && detected="win2016-eval"
|
||||||
|
[[ "${name,,}" == *"windows 7"* ]] && detected="win7x64-ultimate"
|
||||||
|
|
||||||
echo "$detected"
|
echo "$detected"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
selectXML() {
|
detectImage() {
|
||||||
|
|
||||||
local dir="$1"
|
local dir="$1"
|
||||||
local tag result name name2 detected
|
local tag result name name2
|
||||||
|
|
||||||
XML=""
|
XML=""
|
||||||
[[ "$MANUAL" == [Yy1]* ]] && return 0
|
DETECTED=""
|
||||||
|
|
||||||
if [[ "$EXTERNAL" != [Yy1]* ]] && [ -z "$CUSTOM" ]; then
|
if [[ "$EXTERNAL" != [Yy1]* ]] && [ -z "$CUSTOM" ]; then
|
||||||
XML="$VERSION.xml"
|
DETECTED="$VERSION"
|
||||||
[ -f "/run/assets/$XML" ] && return 0
|
if [[ "$MANUAL" != [Yy1]* ]]; then
|
||||||
|
if [ -f "/run/assets/$DETECTED.xml" ]; then
|
||||||
|
XML="$DETECTED.xml"
|
||||||
|
else
|
||||||
|
warn "image type is '$DETECTED', but no matching XML file exists, $FB."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
info "Detecting Windows version from ISO image..."
|
info "Detecting Windows version from ISO image..."
|
||||||
@ -310,53 +347,71 @@ selectXML() {
|
|||||||
|
|
||||||
if [ ! -f "$loc" ]; then
|
if [ ! -f "$loc" ]; then
|
||||||
warn "failed to locate 'install.wim' or 'install.esd' in ISO image, $FB"
|
warn "failed to locate 'install.wim' or 'install.esd' in ISO image, $FB"
|
||||||
return 0
|
BOOT_MODE="windows_legacy"
|
||||||
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tag="DISPLAYNAME"
|
tag="DISPLAYNAME"
|
||||||
result=$(wimlib-imagex info -xml "$loc" | tr -d '\000')
|
result=$(wimlib-imagex info -xml "$loc" | tr -d '\000')
|
||||||
name=$(sed -n "/$tag/{s/.*<$tag>\(.*\)<\/$tag>.*/\1/;p}" <<< "$result")
|
name=$(sed -n "/$tag/{s/.*<$tag>\(.*\)<\/$tag>.*/\1/;p}" <<< "$result")
|
||||||
detected=$(findVersion "$name")
|
DETECTED=$(findVersion "$name")
|
||||||
|
|
||||||
if [ -z "$detected" ]; then
|
if [ -z "$DETECTED" ]; then
|
||||||
|
|
||||||
tag="PRODUCTNAME"
|
tag="PRODUCTNAME"
|
||||||
name2=$(sed -n "/$tag/{s/.*<$tag>\(.*\)<\/$tag>.*/\1/;p}" <<< "$result")
|
name2=$(sed -n "/$tag/{s/.*<$tag>\(.*\)<\/$tag>.*/\1/;p}" <<< "$result")
|
||||||
[ -z "$name" ] && name="$name2"
|
[ -z "$name" ] && name="$name2"
|
||||||
detected=$(findVersion "$name2")
|
DETECTED=$(findVersion "$name2")
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$detected" ]; then
|
if [ -n "$DETECTED" ]; then
|
||||||
|
|
||||||
if [ -f "/run/assets/$detected.xml" ]; then
|
if [ -f "/run/assets/$DETECTED.xml" ]; then
|
||||||
XML="$detected.xml"
|
[[ "$MANUAL" != [Yy1]* ]] && XML="$DETECTED.xml"
|
||||||
echo "Detected image of type '$detected', which supports automatic installation."
|
info "Detected image of type: '$DETECTED'"
|
||||||
else
|
else
|
||||||
warn "detected image of type '$detected', but no matching XML file exists, $FB."
|
warn "detected image of type '$DETECTED', but no matching XML file exists, $FB."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
if [ -z "$name" ]; then
|
if [ -z "$name" ]; then
|
||||||
warn "failed to detect Windows version from image, $FB"
|
warn "failed to determine Windows version from image, $FB"
|
||||||
else
|
else
|
||||||
if [[ "${name,,}" == "windows 7" ]]; then
|
warn "failed to determine Windows version from string '$name', $FB"
|
||||||
warn "detected Windows 7 image, $FB"
|
|
||||||
else
|
|
||||||
warn "failed to detect Windows version from string '$name', $FB"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
prepareImage() {
|
||||||
|
|
||||||
|
local iso="$1"
|
||||||
|
local dir="$2"
|
||||||
|
|
||||||
|
[[ "${DETECTED,,}" != "win7x64"* ]] && return 0
|
||||||
|
|
||||||
|
ETFS="boot.img"
|
||||||
|
BOOT_MODE="windows_legacy"
|
||||||
|
|
||||||
|
local len offset
|
||||||
|
len=$(isoinfo -d -i "$iso" | grep "Nsect " | grep -o "[^ ]*$")
|
||||||
|
offset=$(isoinfo -d -i "$iso" | grep "Bootoff " | grep -o "[^ ]*$")
|
||||||
|
|
||||||
|
if ! dd "if=$iso" "of=$dir/$ETFS" bs=2048 "count=$len" "skip=$offset" status=none; then
|
||||||
|
error "Failed to extract boot image from ISO!"
|
||||||
|
exit 67
|
||||||
|
fi
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
updateImage() {
|
updateImage() {
|
||||||
|
|
||||||
local dir="$1"
|
local iso="$1"
|
||||||
local asset="$2"
|
local dir="$2"
|
||||||
|
local asset="/run/assets/$3"
|
||||||
local index result
|
local index result
|
||||||
|
|
||||||
[ ! -f "$asset" ] && return 0
|
[ ! -f "$asset" ] && return 0
|
||||||
@ -367,7 +422,8 @@ updateImage() {
|
|||||||
|
|
||||||
if [ ! -f "$loc" ]; then
|
if [ ! -f "$loc" ]; then
|
||||||
warn "failed to locate 'boot.wim' or 'boot.esd' in ISO image, $FB"
|
warn "failed to locate 'boot.wim' or 'boot.esd' in ISO image, $FB"
|
||||||
return 0
|
BOOT_MODE="windows_legacy"
|
||||||
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
info "Adding XML file for automatic installation..."
|
info "Adding XML file for automatic installation..."
|
||||||
@ -379,7 +435,10 @@ updateImage() {
|
|||||||
index="2"
|
index="2"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
wimlib-imagex update "$loc" "$index" --command "add $asset /autounattend.xml" > /dev/null
|
if ! wimlib-imagex update "$loc" "$index" --command "add $asset /autounattend.xml" > /dev/null; then
|
||||||
|
warn "failed to add XML to ISO image, $FB"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@ -389,6 +448,7 @@ buildImage() {
|
|||||||
local dir="$1"
|
local dir="$1"
|
||||||
local cat="BOOT.CAT"
|
local cat="BOOT.CAT"
|
||||||
local label="${BASE%.*}"
|
local label="${BASE%.*}"
|
||||||
|
local log="/run/shm/iso.log"
|
||||||
local size size_gb space space_gb
|
local size size_gb space space_gb
|
||||||
|
|
||||||
label="${label::30}"
|
label="${label::30}"
|
||||||
@ -404,16 +464,37 @@ buildImage() {
|
|||||||
space_gb=$(( (space + 1073741823)/1073741824 ))
|
space_gb=$(( (space + 1073741823)/1073741824 ))
|
||||||
|
|
||||||
if (( size > space )); then
|
if (( size > space )); then
|
||||||
error "Not enough free space in $STORAGE, have $space_gb GB available but need at least $size_gb GB." && exit 63
|
error "Not enough free space in $STORAGE, have $space_gb GB available but need at least $size_gb GB."
|
||||||
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
genisoimage -b "$ETFS" -no-emul-boot -c "$cat" -iso-level 4 -J -l -D -N -joliet-long -relaxed-filenames -quiet -V "$label" -udf \
|
if [[ "${BOOT_MODE,,}" != "windows_legacy" ]]; then
|
||||||
-boot-info-table -eltorito-alt-boot -eltorito-boot "$EFISYS" -no-emul-boot -o "$out" -allow-limited-size "$dir"
|
|
||||||
|
|
||||||
[ -n "$CUSTOM" ] && rm -f "$STORAGE/$CUSTOM"
|
if ! genisoimage -o "$out" -b "$ETFS" -no-emul-boot -c "$cat" -iso-level 4 -J -l -D -N -joliet-long -relaxed-filenames -V "$label" \
|
||||||
|
-udf -boot-info-table -eltorito-alt-boot -eltorito-boot "$EFISYS" -no-emul-boot -allow-limited-size -quiet "$dir" 2> "$log"; then
|
||||||
|
[ -f "$log" ] && echo "$(<"$log")"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
if ! genisoimage -o "$out" -b "$ETFS" -no-emul-boot -c "$cat" -iso-level 2 -J -l -D -N -joliet-long -relaxed-filenames -V "$label" \
|
||||||
|
-udf -allow-limited-size -quiet "$dir" 2> "$log"; then
|
||||||
|
[ -f "$log" ] && echo "$(<"$log")"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
local error=""
|
||||||
|
local hide="Warning: creating filesystem that does not conform to ISO-9660."
|
||||||
|
|
||||||
|
[ -f "$log" ] && error="$(<"$log")"
|
||||||
|
[[ "$error" != "$hide" ]] && echo "$error"
|
||||||
|
|
||||||
if [ -f "$STORAGE/$BASE" ]; then
|
if [ -f "$STORAGE/$BASE" ]; then
|
||||||
error "File $STORAGE/$BASE does already exist ?!" && exit 64
|
error "File $STORAGE/$BASE does already exist?!"
|
||||||
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mv "$out" "$STORAGE/$BASE"
|
mv "$out" "$STORAGE/$BASE"
|
||||||
@ -423,30 +504,48 @@ buildImage() {
|
|||||||
######################################
|
######################################
|
||||||
|
|
||||||
if ! startInstall; then
|
if ! startInstall; then
|
||||||
|
|
||||||
|
if [ -f "$STORAGE/windows.old" ]; then
|
||||||
|
BOOT_MODE="windows_legacy"
|
||||||
|
fi
|
||||||
|
|
||||||
rm -rf "$TMP"
|
rm -rf "$TMP"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "$ISO" ]; then
|
if [ ! -f "$ISO" ]; then
|
||||||
downloadImage "$ISO" "$VERSION"
|
if ! downloadImage "$ISO" "$VERSION"; then
|
||||||
|
error "Failed to download $VERSION"
|
||||||
|
exit 61
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! extractImage "$ISO" "$DIR"; then
|
if ! extractImage "$ISO" "$DIR"; then
|
||||||
|
abortInstall "$ISO"
|
||||||
if [[ "$ISO" != "$STORAGE/$BASE" ]]; then
|
|
||||||
mv -f "$ISO" "$STORAGE/$BASE"
|
|
||||||
fi
|
|
||||||
|
|
||||||
finishInstall "$STORAGE/$BASE"
|
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
selectXML "$DIR"
|
if ! detectImage "$DIR"; then
|
||||||
|
abortInstall "$ISO"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
updateImage "$DIR" "/run/assets/$XML"
|
if ! prepareImage "$ISO" "$DIR"; then
|
||||||
|
abortInstall "$ISO"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
buildImage "$DIR"
|
if ! updateImage "$ISO" "$DIR" "$XML"; then
|
||||||
|
abortInstall "$ISO"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -f "$ISO"
|
||||||
|
|
||||||
|
if ! buildImage "$DIR"; then
|
||||||
|
error "Failed to build image!"
|
||||||
|
exit 65
|
||||||
|
fi
|
||||||
|
|
||||||
finishInstall "$STORAGE/$BASE"
|
finishInstall "$STORAGE/$BASE"
|
||||||
|
|
||||||
|
16
src/power.sh
16
src/power.sh
@ -116,14 +116,15 @@ _graceful_shutdown() {
|
|||||||
finish "$code" && return "$code"
|
finish "$code" && return "$code"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
local remove_iso=""
|
||||||
|
|
||||||
|
if [ ! -f "$STORAGE/windows.old" ]; then
|
||||||
if [ ! -f "$STORAGE/windows.boot" ] && [ -f "$QEMU_PTY" ]; then
|
if [ ! -f "$STORAGE/windows.boot" ] && [ -f "$QEMU_PTY" ]; then
|
||||||
if ! grep -Fq "Windows Boot Manager" "$QEMU_PTY"; then
|
if grep -Fq "Windows Boot Manager" "$QEMU_PTY"; then
|
||||||
|
[ -f "$STORAGE/$BASE" ] && remove_iso="y"
|
||||||
|
else
|
||||||
info "Cannot send ACPI signal during Windows setup, aborting..."
|
info "Cannot send ACPI signal during Windows setup, aborting..."
|
||||||
finish "$code" && return "$code"
|
finish "$code" && return "$code"
|
||||||
else
|
|
||||||
if [ -f "$STORAGE/$BASE" ]; then
|
|
||||||
rm -f "$STORAGE/$BASE"
|
|
||||||
touch "$STORAGE/windows.boot"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -150,6 +151,11 @@ _graceful_shutdown() {
|
|||||||
|
|
||||||
if [ "$cnt" -ge "$QEMU_TIMEOUT" ]; then
|
if [ "$cnt" -ge "$QEMU_TIMEOUT" ]; then
|
||||||
error "Shutdown timeout reached, aborting..."
|
error "Shutdown timeout reached, aborting..."
|
||||||
|
else
|
||||||
|
if [ -n "$remove_iso" ]; then
|
||||||
|
rm -f "$STORAGE/$BASE"
|
||||||
|
touch "$STORAGE/windows.boot"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
finish "$code" && return "$code"
|
finish "$code" && return "$code"
|
||||||
|
Loading…
Reference in New Issue
Block a user