From 97df7618412de7d16fff73b67f65537e00e5dfbb Mon Sep 17 00:00:00 2001 From: Stefan Knoblich Date: Sun, 24 May 2026 20:59:38 +0200 Subject: [PATCH] nano11 builder script refinement Signed-off-by: Stefan Knoblich --- bootstrap/nano11builder.ps1 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bootstrap/nano11builder.ps1 b/bootstrap/nano11builder.ps1 index 177e6b9..e40bbe8 100644 --- a/bootstrap/nano11builder.ps1 +++ b/bootstrap/nano11builder.ps1 @@ -240,7 +240,7 @@ foreach ($package in $packagesToRemove) { Write-Host "Removing of system apps complete! Now proceeding to removal of system packages..." Start-Sleep -Seconds 1 -Clear-Host +#Clear-Host $packagePatterns = @( "Microsoft-Windows-InternetExplorer-Optional-Package~", @@ -306,11 +306,11 @@ Get-ChildItem -Path "$driverRepo" -Directory | ForEach-Object { Set-ItemOwnershipAndAccess -Path $driverFolder.FullName -Recurse & 'robocopy' "$emptyDirForDrivers" $driverFolder.FullName /MIR /R:0 /W:0 | Out-Null Remove-Item -Path $driverFolder.FullName -Recurse -Force - break + break # Move to the next folder once a match is found } } } -Remove-Item -Path $emptyDirForDrivers -Recurse -Force +Remove-Item -Path "$emptyDirForDrivers" -Recurse -Force $fontsPath = Join-Path -Path "$winDir" -ChildPath "Fonts" if (Test-Path "$fontsPath") { @@ -532,6 +532,7 @@ Write-Host "Bypassing system requirements (on boot image):" & 'reg' 'add' 'HKLM\zSYSTEM\Setup\LabConfig' /v 'BypassSecureBootCheck' /t REG_DWORD /d 1 /f | Out-Null & 'reg' 'add' 'HKLM\zSYSTEM\Setup\LabConfig' /v 'BypassStorageCheck' /t REG_DWORD /d 1 /f | Out-Null & 'reg' 'add' 'HKLM\zSYSTEM\Setup\LabConfig' /v 'BypassTPMCheck' /t REG_DWORD /d 1 /f | Out-Null +& 'reg' 'add' 'HKLM\zSYSTEM\Setup\MoSetup' /v 'AllowUpgradesWithUnsupportedTPMOrCPU' /t REG_DWORD /d 1 /f | Out-Null & 'reg' 'add' 'HKLM\zSYSTEM\Setup' /v 'CmdLine' /t REG_SZ /d 'x:\sources\setup.exe' /f | Out-Null reg unload HKLM\zSYSTEM | Out-Null @@ -542,7 +543,7 @@ Remove-Item -Path $bootWimPath -Force & 'dism' /English /Export-Image "/SourceImageFile:$newBootWimPath" /SourceIndex:1 "/DestinationImageFile:$finalBootWimPath" /compress:max Remove-Item -Path $newBootWimPath -Force Rename-Item -Path $finalBootWimPath -NewName "boot.wim" -Clear-Host +#Clear-Host Write-Host "Exporting final image to highly compressed ESD format..." & dism /English /Export-Image /SourceImageFile:"$scratchDrive\nano11\sources\install.wim" /SourceIndex:1 /DestinationImageFile:"$scratchDrive\nano11\sources\install.esd" /Compress:recovery