#Requires -RunAsAdministrator [CmdletBinding()] param([string]$WdkRoot) $ErrorActionPreference = 'Stop' $projectDir = $PSScriptRoot $repoRoot = (Resolve-Path (Join-Path $projectDir '..\..')).Path . (Join-Path $projectDir 'common.ps1') $wdkRoot = Find-Qa6WdkRoot -ExplicitRoot $WdkRoot -RepoRoot $repoRoot $wdkVersion = Find-Qa6WdkVersion -WdkRoot $wdkRoot $packageDir = Join-Path $projectDir 'package' $certificate = Join-Path $packageDir 'QemuA6Ude-Test.cer' $inf = Join-Path $packageDir 'QemuA6Ude.inf' $devcon = Join-Path $wdkRoot "tools\$wdkVersion\x64\devcon.exe" foreach ($required in @($certificate, $inf, $devcon)) { if (-not (Test-Path -LiteralPath $required -PathType Leaf)) { throw "Required file not found: $required" } } Import-Certificate -FilePath $certificate -CertStoreLocation Cert:\LocalMachine\Root | Out-Null Import-Certificate -FilePath $certificate -CertStoreLocation Cert:\LocalMachine\TrustedPublisher | Out-Null & $devcon install $inf 'Root\QemuA6Ude' if ($LASTEXITCODE -ne 0) { throw "Driver installation failed ($LASTEXITCODE)." } Write-Host 'QemuA6Ude driver installed.' Write-Host 'The USB\VID_05AC&PID_1227 child device should now be visible.'