atlas-fleet/autounattend.xml

260 lines
11 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<!-- ==========================================
FASE 1: Windows PE (boot van USB)
========================================== -->
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE"
processorArchitecture="amd64"
publicKeyToken="31bf3856ad364e35"
language="neutral"
versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
<SetupUILanguage>
<UILanguage>nl-NL</UILanguage>
<WillShowUI>OnError</WillShowUI>
</SetupUILanguage>
<InputLocale>0409:00020409;080c:0000080c</InputLocale>
<SystemLocale>nl-NL</SystemLocale>
<UILanguage>nl-NL</UILanguage>
<UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>nl-NL</UserLocale>
</component>
<component name="Microsoft-Windows-Setup"
processorArchitecture="amd64"
publicKeyToken="31bf3856ad364e35"
language="neutral"
versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
<UserData>
<!-- GEEN expliciete ProductKey: laat BIOS-digitale licentie de editie bepalen.
HP EliteBooks hebben Windows Pro in de BIOS (SLP/MSDM).
Als je een Home-key opgeeft terwijl BIOS Pro heeft, mislukt setup
zonder foutmelding. Laat dit veld dus LEEG. -->
<AcceptEula>true</AcceptEula>
<FullName>Atlas</FullName>
<Organization>Atlas Corporation</Organization>
</UserData>
<DiskConfiguration>
<Disk wcm:action="add">
<DiskID>0</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>
<Label>System</Label>
<Format>FAT32</Format>
</ModifyPartition>
<ModifyPartition wcm:action="add">
<Order>2</Order>
<PartitionID>2</PartitionID>
</ModifyPartition>
<ModifyPartition wcm:action="add">
<Order>3</Order>
<PartitionID>3</PartitionID>
<Label>Windows</Label>
<Letter>C</Letter>
<Format>NTFS</Format>
</ModifyPartition>
</ModifyPartitions>
</Disk>
</DiskConfiguration>
<ImageInstall>
<OSImage>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>3</PartitionID>
</InstallTo>
<!-- Geen EDITIONID: setup kiest editie obv BIOS-digitale licentie.
HP EliteBook = Pro. Core (Home) key TX9XD veroorzaakte stille fout. -->
<WillShowUI>OnError</WillShowUI>
</OSImage>
</ImageInstall>
</component>
</settings>
<!-- ==========================================
FASE 2: Specialize
========================================== -->
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup"
processorArchitecture="amd64"
publicKeyToken="31bf3856ad364e35"
language="neutral"
versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
<ComputerName>Atlas</ComputerName>
<TimeZone>W. Europe Standard Time</TimeZone>
</component>
<component name="Microsoft-Windows-International-Core"
processorArchitecture="amd64"
publicKeyToken="31bf3856ad364e35"
language="neutral"
versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
<InputLocale>0409:00020409;080c:0000080c</InputLocale>
<SystemLocale>nl-NL</SystemLocale>
<UILanguage>nl-NL</UILanguage>
<UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>nl-NL</UserLocale>
</component>
<component name="Microsoft-Windows-Deployment"
processorArchitecture="amd64"
publicKeyToken="31bf3856ad364e35"
language="neutral"
versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
<RunSynchronous>
<!-- Debug map aanmaken + fase loggen -->
<RunSynchronousCommand wcm:action="add">
<Order>1</Order>
<Path>cmd.exe /c "mkdir C:\AtlasDebug 2>nul &amp; echo [%DATE% %TIME%] Specialize gestart > C:\AtlasDebug\setup-phases.log"</Path>
<WillReboot>Never</WillReboot>
</RunSynchronousCommand>
<!-- Setup-bestanden kopiëren van USB naar C:\Atlas
FIX v2: gebruikt Combine() ipv foutgevoelige string-concatenatie -->
<RunSynchronousCommand wcm:action="add">
<Order>2</Order>
<Path>powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "$null=New-Item -Type Directory -Force C:\Atlas,C:\AtlasDebug -ErrorAction SilentlyContinue; $found=$false; foreach($d in [char[]](65..90)){ foreach($sub in @('Scripts','scripts')){ $s=[IO.Path]::Combine($d+':\',$sub,'Setup-Laptop.ps1'); if(Test-Path $s){ Copy-Item $s C:\Atlas\ -Force; $f=[IO.Path]::Combine($d+':\',$sub,'fleet.config'); if(Test-Path $f){Copy-Item $f C:\Atlas\ -Force}; $h=[IO.Path]::Combine($d+':\',$sub,'HPImageAssistant.exe'); if(Test-Path $h){Copy-Item $h C:\Atlas\ -Force}; Add-Content C:\AtlasDebug\setup-phases.log ('['+[DateTime]::Now.ToString('s')+'] Bestanden gekopieerd van '+$d+':\'+$sub); $found=$true; break}}; if($found){break}}; if(-not $found){Add-Content C:\AtlasDebug\setup-phases.log '[WARN] Geen USB setup-bestanden gevonden'}"</Path>
<WillReboot>Never</WillReboot>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>
<!-- ==========================================
FASE 3: OOBE
========================================== -->
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup"
processorArchitecture="amd64"
publicKeyToken="31bf3856ad364e35"
language="neutral"
versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
<AutoLogon>
<Domain>.</Domain>
<Enabled>true</Enabled>
<LogonCount>1</LogonCount>
<Password>
<Value>AtlasSetup123</Value>
<PlainText>true</PlainText>
</Password>
<Username>Administrator</Username>
</AutoLogon>
<FirstLogonCommands>
<!-- Fase loggen -->
<SynchronousCommand wcm:action="add">
<Order>1</Order>
<CommandLine>cmd.exe /c "echo [%DATE% %TIME%] FirstLogonCommands gestart >> C:\AtlasDebug\setup-phases.log"</CommandLine>
<RequiresUserInput>false</RequiresUserInput>
</SynchronousCommand>
<!-- Panther setup-logs kopiëren voor diagnose -->
<SynchronousCommand wcm:action="add">
<Order>2</Order>
<CommandLine>powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "$null=New-Item -Type Directory -Force C:\AtlasDebug\panther; Copy-Item C:\Windows\Panther\*.log C:\AtlasDebug\panther\ -Force -ErrorAction SilentlyContinue; Copy-Item C:\Windows\Panther\*.xml C:\AtlasDebug\panther\ -ErrorAction SilentlyContinue; Add-Content C:\AtlasDebug\setup-phases.log ('['+[DateTime]::Now.ToString('s')+'] Panther logs gekopieerd')"</CommandLine>
<RequiresUserInput>false</RequiresUserInput>
</SynchronousCommand>
<!-- Fallback: bestanden kopiëren als specialize dat niet deed -->
<SynchronousCommand wcm:action="add">
<Order>3</Order>
<CommandLine>powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "if(-not(Test-Path 'C:\Atlas\Setup-Laptop.ps1')){ $null=New-Item -Type Directory -Force C:\Atlas; foreach($d in [char[]](68..90)){ foreach($sub in @('Scripts','scripts')){ $s=[IO.Path]::Combine($d+':\',$sub,'Setup-Laptop.ps1'); if(Test-Path $s){ Copy-Item $s C:\Atlas\ -Force; $f=[IO.Path]::Combine($d+':\',$sub,'fleet.config'); if(Test-Path $f){Copy-Item $f C:\Atlas\ -Force}; $h=[IO.Path]::Combine($d+':\',$sub,'HPImageAssistant.exe'); if(Test-Path $h){Copy-Item $h C:\Atlas\ -Force}; break}}}}"</CommandLine>
<RequiresUserInput>false</RequiresUserInput>
</SynchronousCommand>
<!-- Setup-script uitvoeren -->
<SynchronousCommand wcm:action="add">
<Order>4</Order>
<CommandLine>powershell.exe -ExecutionPolicy Bypass -NoProfile -WindowStyle Normal -File "C:\Atlas\Setup-Laptop.ps1"</CommandLine>
<Description>Atlas Laptop Setup</Description>
<RequiresUserInput>false</RequiresUserInput>
</SynchronousCommand>
</FirstLogonCommands>
<OOBE>
<HideEULAPage>true</HideEULAPage>
<HideLocalAccountScreen>true</HideLocalAccountScreen>
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<NetworkLocation>Home</NetworkLocation>
<ProtectYourPC>3</ProtectYourPC>
</OOBE>
<TimeZone>W. Europe Standard Time</TimeZone>
<UserAccounts>
<AdministratorPassword>
<Value>AtlasSetup123</Value>
<PlainText>true</PlainText>
</AdministratorPassword>
<LocalAccounts>
<LocalAccount wcm:action="add">
<DisplayName>Atlas</DisplayName>
<Group>Administrators</Group>
<Name>Atlas</Name>
<Password>
<Value>Atlas</Value>
<PlainText>true</PlainText>
</Password>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
</component>
<component name="Microsoft-Windows-International-Core"
processorArchitecture="amd64"
publicKeyToken="31bf3856ad364e35"
language="neutral"
versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
<InputLocale>0409:00020409;080c:0000080c</InputLocale>
<SystemLocale>nl-NL</SystemLocale>
<UILanguage>nl-NL</UILanguage>
<UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>nl-NL</UserLocale>
</component>
</settings>
</unattend>