diff --git a/configs/autounattend-builder-amd64-20260527.xml b/configs/autounattend-builder-amd64-20260527.xml index 3321726..54ee88c 100644 --- a/configs/autounattend-builder-amd64-20260527.xml +++ b/configs/autounattend-builder-amd64-20260527.xml @@ -540,11 +540,11 @@ Set-ItemProperty -LiteralPath $key -Name 'ConfigureStartPins' -Value $json -Type Add-Type -TypeDefinition ' using System.Drawing; using System.Runtime.InteropServices; - + public static class WallpaperSetter { [DllImport("user32.dll")] private static extern bool SetSysColors( - int cElements, + int cElements, int[] lpaElements, int[] lpaRgbValues ); @@ -834,7 +834,7 @@ $scripts = @( 'SubscribedContent-353698Enabled'; 'SystemPaneSuggestionsEnabled'; ); - + foreach( $name in $names ) { reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v $name /t REG_DWORD /d 0 /f; } @@ -1316,7 +1316,7 @@ $scripts = @( } Write-Output "Installing NodeJS ${pkg_version}..."; - Start-Process "msiexec.exe" -ArgumentList "/i `"${env:TEMP}\${pkg_file}`" /log `"${env:WINDIR}\Setup\Scripts\node.log`" /passive /norestart ALLUSERS=1" -Wait -PassThru | Out-Null; + Start-Process "msiexec.exe" -ArgumentList "/i `"${env:TEMP}\${pkg_file}`" /log `"${env:WINDIR}\Setup\Scripts\node.log`" /passive /norestart ALLUSERS=1" -Wait -PassThru | Out-Null; Remove-Item -LiteralPath "${env:TEMP}\${pkg_file}" -Force -ErrorAction 'SilentlyContinue'; @@ -1342,7 +1342,7 @@ $scripts = @( } Write-Output "Installing Yarn Legacy ${pkg_version}..."; - Start-Process "msiexec.exe" -ArgumentList "/i `"${env:TEMP}\${pkg_file}`" /log `"${env:WINDIR}\Setup\Scripts\yarn.log`" /passive /norestart ALLUSERS=1" -Wait -PassThru | Out-Null; + Start-Process "msiexec.exe" -ArgumentList "/i `"${env:TEMP}\${pkg_file}`" /log `"${env:WINDIR}\Setup\Scripts\yarn.log`" /passive /norestart ALLUSERS=1" -Wait -PassThru | Out-Null; Remove-Item -LiteralPath "${env:TEMP}\${pkg_file}" -Force -ErrorAction 'SilentlyContinue'; @@ -1377,7 +1377,7 @@ $scripts = @( } Write-Output "Installing Rust MSVC ${pkg_version}..."; - Start-Process "msiexec.exe" -ArgumentList "/i `"${env:TEMP}\${pkg_file}`" /log `"${env:WINDIR}\Setup\Scripts\rust.log`" /passive /norestart ALLUSERS=1" -Wait -PassThru | Out-Null; + Start-Process "msiexec.exe" -ArgumentList "/i `"${env:TEMP}\${pkg_file}`" /log `"${env:WINDIR}\Setup\Scripts\rust.log`" /passive /norestart ALLUSERS=1" -Wait -PassThru | Out-Null; Remove-Item -LiteralPath "${env:TEMP}\${pkg_file}" -Force -ErrorAction 'SilentlyContinue'; @@ -1624,7 +1624,7 @@ $scripts = @( Start-Process -FilePath "${env:TEMP}\${pkg_file}" -ArgumentList ` (@( '/quiet /norestart /ceip off', "/log `"${env:WINDIR}\Setup\Scripts\WinSDK.log`"" ) + $pkg_options) ` - -Wait -PassThru | Out-Null; + -Wait -PassThru | Out-Null; Remove-Item -LiteralPath "${env:TEMP}\${pkg_file}" -Force -ErrorAction 'SilentlyContinue'; @@ -1646,12 +1646,20 @@ $scripts = @( Remove-Item -LiteralPath "${env:TEMP}\${pkg_file}" -Force -ErrorAction 'SilentlyContinue'; # Load viofs driver - Start-Process "PnpUtil.exe" -ArgumentList "/add-driver `"${env:SystemDrive}\Drivers\viofs\viofs.inf`" /install" ` + # Start-Process "PnpUtil.exe" -ArgumentList "/add-driver `"${env:SystemDrive}\Drivers\viofs\viofs.inf`" /install" ` + # -Wait -PassThru; + + Start-Process "PnpUtil.exe" -ArgumentList "/add-driver `"${env:WINDIR}\ConfigSetRoot\drivers\viofs\viofs.inf`" /install" ` -Wait -PassThru; # Install VirtioFS service + #New-Service -Name VirtioFsSvc -DisplayName 'Virtio FS Service' ` + # -BinaryPathName "${env:SystemDrive}\drivers\viofs\virtiofs.exe" ` + # -StartupType 'Automatic' ` + # -DependsOn 'WinFsp.Launcher'; + New-Service -Name VirtioFsSvc -DisplayName 'Virtio FS Service' ` - -BinaryPathName "${env:SystemDrive}\Drivers\viofs\virtiofs.exe" ` + -BinaryPathName "${env:WINDIR}\ConfigSetRoot\drivers\viofs\virtiofs.exe" ` -StartupType 'Automatic' ` -DependsOn 'WinFsp.Launcher'; @@ -1680,7 +1688,7 @@ $scripts = @( $userSid = $userAccount.Translate([System.Security.Principal.SecurityIdentifier]).value; Write-Output "Resolved username '${userName}' to SID '${userSid}'"; - # + # # Set-ExecutionPolicy -ExecutionPolicy 'RemoteSigned' -Scope 'LocalMachine' -ErrorAction 'SilentlyContinue'; # Switch auto-logon to builder user diff --git a/win11-builder-generic.sh b/win11-builder-generic.sh index 9f9b994..c6f51a4 100755 --- a/win11-builder-generic.sh +++ b/win11-builder-generic.sh @@ -327,6 +327,12 @@ function qemu_fill_unattend_fs { echo "Copying ${x} into \$WinPEDriver\$..." >&2 find "${destdir}/drivers/${x}/" -maxdepth 1 -type f -exec cp '{}' "${destdir}/\$WinPEDriver\$/" \; || return $? } + + # Create an additional copy of viofs + #[[ "${x}" == "viofs" ]] && { + # mkdir -p "${destdir}/\$OEM\$/\$1/drivers" || return $? + # cp -rf "${destdir}/drivers/${x}" "${destdir}/\$OEM\$/\$1/drivers/" || return $? + #} done }