- Add -Reboot/-MinUptimeDays parameter set to reboot high-uptime PCs via API - Add WebClient fallback for TLS/SSL connection errors on API calls - Add per-user registry scanning (HKU hives) for installed app detection - Add Dashboard and Lobby Display kiosk app detection (app IDs 82, 83) - Add SkipCertificateCheck support for PowerShell 7+ - Increase session timeouts (20s connect, 120s operation) - Increase default ThrottleLimit from 10 to 25 - Add Install-KioskApp.ps1 and user registry detection test scripts Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
51 lines
2.2 KiB
PowerShell
51 lines
2.2 KiB
PowerShell
# Test script to debug user registry detection
|
|
Write-Host "=== User Registry Detection Test ===" -ForegroundColor Cyan
|
|
|
|
# 1. Check HKU (HKEY_USERS) for all loaded user hives
|
|
Write-Host "`n[1] Checking loaded user hives in HKU:" -ForegroundColor Yellow
|
|
$hkuKeys = Get-ChildItem "Registry::HKU" -ErrorAction SilentlyContinue
|
|
foreach ($key in $hkuKeys) {
|
|
$sid = $key.PSChildName
|
|
if ($sid -match "^S-1-5-21-" -and $sid -notmatch "_Classes$") {
|
|
Write-Host " SID: $sid" -ForegroundColor Gray
|
|
$uninstallPath = "Registry::HKU\$sid\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*"
|
|
if (Test-Path $uninstallPath) {
|
|
$apps = Get-ItemProperty $uninstallPath -ErrorAction SilentlyContinue |
|
|
Where-Object { $_.DisplayName -like "*Dashboard*" -or $_.DisplayName -like "*GE Aerospace*" }
|
|
if ($apps) {
|
|
foreach ($app in $apps) {
|
|
Write-Host " FOUND: $($app.DisplayName)" -ForegroundColor Green
|
|
}
|
|
} else {
|
|
Write-Host " No Dashboard/GE Aerospace apps" -ForegroundColor Gray
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
# 2. Check HKCU directly
|
|
Write-Host "`n[2] Checking HKCU (current user):" -ForegroundColor Yellow
|
|
$hkcuApps = Get-ItemProperty "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*" -ErrorAction SilentlyContinue |
|
|
Where-Object { $_.DisplayName -like "*Dashboard*" -or $_.DisplayName -like "*GE Aerospace*" }
|
|
if ($hkcuApps) {
|
|
foreach ($app in $hkcuApps) {
|
|
Write-Host " FOUND: $($app.DisplayName)" -ForegroundColor Green
|
|
}
|
|
} else {
|
|
Write-Host " No Dashboard/GE Aerospace apps in HKCU" -ForegroundColor Gray
|
|
}
|
|
|
|
# 3. Check user profiles
|
|
Write-Host "`n[3] User profiles in C:\Users:" -ForegroundColor Yellow
|
|
$profiles = Get-ChildItem "C:\Users" -Directory | Where-Object { $_.Name -notin @('Public','Default','Default User','All Users') }
|
|
foreach ($p in $profiles) {
|
|
Write-Host " $($p.Name)" -ForegroundColor Gray
|
|
}
|
|
|
|
# 4. Current user context
|
|
Write-Host "`n[4] Current execution context:" -ForegroundColor Yellow
|
|
Write-Host " Username: $env:USERNAME" -ForegroundColor Gray
|
|
Write-Host " UserDomain: $env:USERDOMAIN" -ForegroundColor Gray
|
|
|
|
Write-Host "`n=== Done ===" -ForegroundColor Cyan
|