$installer = "C:\Users\Administrator\.gemini\antigravity\scratch\ClassNotify\dist\ClassNotifySetup.exe" Write-Host "Installing with code BJ82-2026..." -ForegroundColor Cyan & $installer /silent /code=BJ82-2026 Start-Sleep -Seconds 5 Write-Host "`n=== 1. Check Service Status ===" -ForegroundColor Cyan sc.exe query ClassNotifyService Write-Host "`n=== 2. Check Device Credentials ===" -ForegroundColor Cyan Get-Content "C:\ProgramData\ClassNotify\device_credentials.json" Write-Host "`n=== 3. Check Processes ===" -ForegroundColor Cyan Get-Process -Name ClassNotify.Service, ClassNotify.Client -ErrorAction SilentlyContinue | Select-Object Id, ProcessName, SessionId, Path Write-Host "`n=== 4. Send Cloud Notification to cls_802 ===" -ForegroundColor Cyan $teacherUser = if ($env:CLASSNOTIFY_E2E_USERNAME) { $env:CLASSNOTIFY_E2E_USERNAME } else { "teacher_zhang" } $teacherPass = $env:CLASSNOTIFY_E2E_PASSWORD if (-not $teacherPass) { throw "CLASSNOTIFY_E2E_PASSWORD is required" } $loginRes = Invoke-RestMethod -Uri "https://classnotify.paradise.eu.org/api/auth/login" -Method Post -Body (@{ username = $teacherUser; password = $teacherPass } | ConvertTo-Json) -ContentType "application/json" $headers = @{ Authorization = "Bearer $($loginRes.token)" } $notifBody = @{ classId = "cls_802" studentName = "Zhao Liu" title = "Office Notification" message = "Zhao Liu, please collect the math homework at the office." voice = $true shake = $true durationSeconds = 15 } | ConvertTo-Json $sendRes = Invoke-RestMethod -Uri "https://classnotify.paradise.eu.org/api/notification/send" -Method Post -Headers $headers -Body $notifBody -ContentType "application/json" $sendRes | ConvertTo-Json Start-Sleep -Seconds 3 Write-Host "`n=== 5. Check Service Logs for Notification & Pipe Relay ===" -ForegroundColor Cyan Get-ChildItem "C:\ProgramData\ClassNotify\logs" | Select-Object -First 1 | Get-Content -Tail 10