| | |
| | | Add-Result $Results "system info collected" $false $_.Exception.Message |
| | | } |
| | | |
| | | Write-Step "Collecting Windows runtime preflight" |
| | | try { |
| | | $webview2Entries = @() |
| | | $uninstallRoots = @( |
| | | "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*", |
| | | "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*", |
| | | "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*" |
| | | ) |
| | | foreach ($root in $uninstallRoots) { |
| | | $webview2Entries += Get-ItemProperty $root -ErrorAction SilentlyContinue | |
| | | Where-Object { $_.DisplayName -match "WebView2" } | |
| | | Select-Object DisplayName, DisplayVersion, Publisher, InstallLocation |
| | | } |
| | | if ($webview2Entries.Count -gt 0) { |
| | | $webview2Entries | Format-List | Out-String | Set-Content -Encoding UTF8 (Join-Path $EvidenceDir "webview2-runtime.txt") |
| | | } else { |
| | | "No WebView2 Runtime entry found in standard uninstall registry paths. App startup logs remain authoritative." | |
| | | Set-Content -Encoding UTF8 (Join-Path $EvidenceDir "webview2-runtime.txt") |
| | | } |
| | | Add-Result $Results "WebView2 registry inventory collected" $true "entries=$($webview2Entries.Count)" |
| | | } catch { |
| | | Add-Result $Results "WebView2 registry inventory collected" $false $_.Exception.Message |
| | | } |
| | | |
| | | try { |
| | | if (Get-Command Get-PnpDevice -ErrorAction SilentlyContinue) { |
| | | Get-PnpDevice -Class AudioEndpoint -ErrorAction SilentlyContinue | |
| | | Select-Object Status, Class, FriendlyName, InstanceId | |
| | | Format-Table -AutoSize | Out-String | |
| | | Set-Content -Encoding UTF8 (Join-Path $EvidenceDir "audio-endpoints.txt") |
| | | } else { |
| | | Get-CimInstance Win32_SoundDevice -ErrorAction SilentlyContinue | |
| | | Select-Object Status, Name, Manufacturer, DeviceID | |
| | | Format-Table -AutoSize | Out-String | |
| | | Set-Content -Encoding UTF8 (Join-Path $EvidenceDir "audio-endpoints.txt") |
| | | } |
| | | Add-Result $Results "audio endpoint inventory collected" $true |
| | | } catch { |
| | | Add-Result $Results "audio endpoint inventory collected" $false $_.Exception.Message |
| | | } |
| | | |
| | | if (-not $CollectOnly -and -not $NoLaunch) { |
| | | Write-Step "Launching app" |
| | | if (-not (Test-Path $ExePath)) { |