From b7ded137f8d5d60dc336deab9c552cff2d44da93 Mon Sep 17 00:00:00 2001 From: Kroese Date: Fri, 7 Aug 2026 13:25:53 +0200 Subject: [PATCH] fix: Trust VirtIO display driver publisher on Windows 8 (#2102) --- assets/win81x64-enterprise.cmd | 13 +++++++++---- assets/win81x64.cmd | 13 +++++++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/assets/win81x64-enterprise.cmd b/assets/win81x64-enterprise.cmd index fd2f9a65..47835962 100644 --- a/assets/win81x64-enterprise.cmd +++ b/assets/win81x64-enterprise.cmd @@ -73,10 +73,15 @@ rem END PRODUCT_KEY rem Trust the VirtIO display driver publisher to avoid an interactive prompt. powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "$catalog = Get-ChildItem -Path (Join-Path $env:SystemRoot 'Drivers\viogpudo') -Filter '*.cat' | Select-Object -First 1; if ($null -eq $catalog) { exit 1 }; $certificate = (Get-AuthenticodeSignature -LiteralPath $catalog.FullName).SignerCertificate; if ($null -eq $certificate) { exit 1 }; [IO.File]::WriteAllBytes((Join-Path $env:TEMP 'viogpudo.cer'), $certificate.Export([Security.Cryptography.X509Certificates.X509ContentType]::Cert))" -if errorlevel 1 exit /b 1 -certutil.exe -addstore -f TrustedPublisher "%TEMP%\viogpudo.cer" -if errorlevel 1 exit /b 1 -del /f /q "%TEMP%\viogpudo.cer" >nul 2>&1 + +if not errorlevel 1 ( + certutil.exe -addstore -f TrustedPublisher "%TEMP%\viogpudo.cer" + if not errorlevel 1 ( + pnputil.exe -i -a "%SystemRoot%\Drivers\viogpudo\viogpudo.inf" + ) +) + +del /q "%TEMP%\viogpudo.cer" >nul 2>&1 rem Install the VirtIO display driver last to avoid disrupting earlier setup work. pnputil.exe -i -a "%SystemRoot%\Drivers\viogpudo\viogpudo.inf" diff --git a/assets/win81x64.cmd b/assets/win81x64.cmd index fd2f9a65..47835962 100644 --- a/assets/win81x64.cmd +++ b/assets/win81x64.cmd @@ -73,10 +73,15 @@ rem END PRODUCT_KEY rem Trust the VirtIO display driver publisher to avoid an interactive prompt. powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "$catalog = Get-ChildItem -Path (Join-Path $env:SystemRoot 'Drivers\viogpudo') -Filter '*.cat' | Select-Object -First 1; if ($null -eq $catalog) { exit 1 }; $certificate = (Get-AuthenticodeSignature -LiteralPath $catalog.FullName).SignerCertificate; if ($null -eq $certificate) { exit 1 }; [IO.File]::WriteAllBytes((Join-Path $env:TEMP 'viogpudo.cer'), $certificate.Export([Security.Cryptography.X509Certificates.X509ContentType]::Cert))" -if errorlevel 1 exit /b 1 -certutil.exe -addstore -f TrustedPublisher "%TEMP%\viogpudo.cer" -if errorlevel 1 exit /b 1 -del /f /q "%TEMP%\viogpudo.cer" >nul 2>&1 + +if not errorlevel 1 ( + certutil.exe -addstore -f TrustedPublisher "%TEMP%\viogpudo.cer" + if not errorlevel 1 ( + pnputil.exe -i -a "%SystemRoot%\Drivers\viogpudo\viogpudo.inf" + ) +) + +del /q "%TEMP%\viogpudo.cer" >nul 2>&1 rem Install the VirtIO display driver last to avoid disrupting earlier setup work. pnputil.exe -i -a "%SystemRoot%\Drivers\viogpudo\viogpudo.inf"