Streaming Gaming PC Setup – Complete Installation Guide (Final 2025 Edition – Hybrid, Crash-Proof, Zero-Watcher)
Total setup time: 3–5 hours (including downloads and testing)
Defaults: HEVC @ 60–70 Mbps (stable for Q80T). AV1 optional to test later (50–60 Mbps).
This guide is event-driven only (Task Scheduler + Vibepollo Commands).
No always-running “watcher” script; everything reacts to real events.
- Pre-Flight Checklist
- Downloads (Gather Everything First)
- Windows Installation & User Accounts
- Drivers & Core Applications
- Vibepollo Streaming Host
- Scheduled Tasks for Playnite Auto-Launch
- Playnite Configuration
- Steam Family Sharing
- Samsung Q80T Moonlight Client
- Controller Setup & Gamepad Keyboard
- Validation Checklist
- Troubleshooting Guide
- Maintenance & Backup (The “Immortality” Checklist)
- Quick Reference Commands
- (Optional) PowerShell One-Click Task Setup
Hardware
- PC with Windows 11 Pro 24H2-capable hardware
- AMD RX 9070 XT (RDNA 4, AV1 encode capable)
- Wired gigabit Ethernet
- USB drive for Windows install (8GB+)
- Second USB drive (optional, for Moonlight USB install)
TV
- Samsung Q80T (2020, Tizen 5.5)
- Ethernet (100 Mbps internal) or 5 GHz WiFi
- Remote with number buttons (for dev mode)
Controllers
- EasySMX X20 (BT or USB dongle)
Network
- Gigabit switch/router
- TV IP known (Settings → General → Network → Network Status)
- PC IP (after install)
The Samsung Q80T’s Ethernet port is capped at 100 Mbps. Streaming at high bitrates (60–70 Mbps) effectively maxes this out. If you experience stuttering, switch to 5 GHz WiFi (which is actually faster than the wired port on this TV) or lower your bitrate to ~50 Mbps.
Accounts
- Dad username/PIN
- Son username/PIN
- Dad Steam email
- Son Steam email (create if needed)
| Software | URL | Notes |
|---|---|---|
| AMD Adrenalin | https://www.amd.com/en/support | Graphics → AMD Radeon → RX 9000 Series → RX 9070 XT |
| Steam | https://store.steampowered.com/about/ | SteamSetup.exe |
| Playnite | https://playnite.link/ | Download |
| ViGEmBus | https://github.com/nefarius/ViGEmBus/releases | Latest ViGEmBus_Setup_x64.msi |
| Vibepollo | https://github.com/Nonary/Vibepollo/releases | Latest Vibepollo.msi |
Moonlight on TV (pick one):
- USB (easy, may need reinstall)
https://github.com/toypoodlegaming/moonlight-chrome-tizen/releases (downloadMoonlightUSB.zip) - Docker sideload (persistent)
- Docker Desktop: https://www.docker.com/products/docker-desktop
- Tizen Studio CLI: https://developer.tizen.org/development/tizen-studio/download
- Tip: Check GitHub Actions artifacts for pre-built
.wgtto skip building.
- Install Windows 11 Pro 24H2 with Secure Boot ON; run Windows Update fully.
- Create Dad/Son accounts:
- Settings → Accounts → Other users → Add account →
“I don’t have this person’s sign-in information” →
“Add a user without a Microsoft account.”
- Settings → Accounts → Other users → Add account →
- Enable PIN (per account):
- Settings → Accounts → Sign-in options → PIN (Windows Hello).
- Verify both accounts appear at login (log back in as Dad to continue).
AMD Adrenalin
- Install (Full or Driver Only) → Reboot.
- Verify in AMD Software: GPU shows RX 9070 XT.
ViGEmBus
- Install
ViGEmBus_Setup_x64.msi. - Verify Device Manager → System devices → “Virtual Gamepad Emulation Bus”.
Steam
- Install, log in as Dad (optional: disable auto-start in settings).
Playnite (per-machine recommended)
- Install “for all users” →
C:\Program Files\Playnite\. - Complete wizard (connect Dad’s Steam if desired), then close.
Install
- Run
Vibepollo.msias admin (defaultC:\Program Files\Vibepollo\). - Vibepollo is a fork of the Sunshine streaming host and installs as the Windows service named Sunshine.
- In
services.msc:- Find Sunshine → confirm it’s Running, Automatic, note the exact name.
- If you ever need to restart Vibepollo, this is the service to restart.
Marker directory
mkdir C:\ProgramData\VibepolloWeb UI
- Open:
https://localhost:47990 - Accept the self-signed cert → set admin credentials.
Capture
- Configuration → Video/Capture → Windows Graphics Capture (WGC).
Virtual display (optional, for monitor-off/headless)
- Enable virtual display/SudoVDA if you plan to stream with the monitor off.
Encoder (stable default)
- Codec: HEVC
- Bitrate: 60–70 Mbps (remember the 100 Mbps TV NIC limit).
- Preset: Speed or Balanced
- AV1 optional: try 50–60 Mbps; if you see black screens or high latency on the Q80T, revert to HEVC and/or lower bitrate.
In the Vibepollo UI go to: Configuration → General → Commands
-
On Connect (runs every time any Moonlight client connects):
cmd /c echo. > C:\ProgramData\Vibepollo\streaming.active & schtasks /run /tn "Playnite-Autolaunch-Dad" 2>nul & schtasks /run /tn "Playnite-Autolaunch-Son" 2>nul
This:
- Creates/refreshes the
streaming.activemarker, and - Immediately asks Task Scheduler to run the Dad/Son Playnite tasks (harmless if they don’t exist yet).
- Creates/refreshes the
-
On Disconnect (runs when the last client disconnects):
cmd /c del C:\ProgramData\Vibepollo\streaming.active 2>nul
-
Elevated: No for both.
Note: The schtasks /run calls are redundant backup triggers. The logon/unlock triggers will fire naturally when users log in, but this “kick” ensures Playnite launches immediately even if the user was already logged in when the stream started (e.g., desktop was unlocked). They are harmless if the tasks don’t exist yet.
You will also keep a Boot Cleanup Task (Section 6) as a safety net in case of crashes/BSOD/power loss where On Disconnect never runs.
Firewall
Ports required (Private profile):
- TCP: 47984–47990
- UDP: 47984–47989
Optional: create rules via PowerShell (run as Administrator):
New-NetFirewallRule -DisplayName "Vibepollo TCP" -Direction Inbound -Protocol TCP -LocalPort 47984-47990 -Action Allow -Profile Private
New-NetFirewallRule -DisplayName "Vibepollo UDP" -Direction Inbound -Protocol UDP -LocalPort 47984-47989 -Action Allow -Profile PrivateVerify rules are enabled. Restart the Sunshine/Vibepollo service after changes.
Goal:
At logon or unlock, if the marker file exists, start Playnite Fullscreen after a small delay (for focus stability), but only if it isn’t already running.
Key paths (no spaces):
- Marker:
C:\ProgramData\Vibepollo\streaming.active - Playnite Fullscreen binary:
"C:\Program Files\Playnite\Playnite.FullscreenApp.exe"
Task action command (for both Dad and Son):
cmd /c if exist C:\ProgramData\Vibepollo\streaming.active (tasklist | find /i "Playnite.FullscreenApp.exe" || start "" "C:\Program Files\Playnite\Playnite.FullscreenApp.exe" --startfullscreen)In Task Scheduler (per user):
- Create Task → Name e.g.
Playnite-Autolaunch-Dad/Playnite-Autolaunch-Son. - Trigger → At log on → specific user (Dad or Son).
- In the trigger → Delay task for: set to 3–5 seconds.
- If controller focus is flaky, push to 5 seconds.
- Add a second trigger:
- Triggers → New → On workstation unlock → same user → set the same 3–5 second delay.
- Action → Start a program →
cmd.exe- Arguments:
/c if exist C:\ProgramData\Vibepollo\streaming.active (tasklist | find /i "Playnite.FullscreenApp.exe" || start "" "C:\Program Files\Playnite\Playnite.FullscreenApp.exe" --startfullscreen)
- Arguments:
- General → Run with highest privileges.
This task is your insurance policy against hard power-offs, BSODs, and Moonlight crashes where the On Disconnect command never runs. Without this, a sudden power loss can leave the marker file on disk forever, causing Playnite to auto-launch on every local login until you manually delete the file.
DO NOT skip this task.
Command (for a separate task that runs at boot):
cmd /c del C:\ProgramData\Vibepollo\streaming.active 2>nulUse:
- Trigger: At startup
- Run as: SYSTEM (or admin) with highest privileges.
SIDs (if using XML import)
Get the SIDs for local users:
Get-WmiObject Win32_UserAccount | Where-Object {$_.LocalAccount -eq $true} | Select Name,SIDLogon + Unlock task for Dad/Son (replace REPLACE_WITH_SID in all three places).
Includes built-in 5-second delay and the “already running” check:
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Author>Administrator</Author>
<Description>Auto-launch Playnite fullscreen when streaming marker is present.</Description>
</RegistrationInfo>
<Triggers>
<LogonTrigger>
<Enabled>true</Enabled>
<UserId>REPLACE_WITH_SID</UserId>
<Delay>PT5S</Delay>
</LogonTrigger>
<SessionStateChangeTrigger>
<Enabled>true</Enabled>
<State>SessionUnlock</State>
<UserId>REPLACE_WITH_SID</UserId>
<Delay>PT5S</Delay>
</SessionStateChangeTrigger>
</Triggers>
<Principals>
<Principal id="Author">
<UserId>REPLACE_WITH_SID</UserId>
<LogonType>InteractiveToken</LogonType>
<RunLevel>HighestAvailable</RunLevel>
</Principal>
</Principals>
<Settings>
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
<DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
<StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
<AllowHardTerminate>true</AllowHardTerminate>
<StartWhenAvailable>true</StartWhenAvailable>
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
<IdleSettings>
<StopOnIdleEnd>false</StopOnIdleEnd>
<RestartOnIdle>false</RestartOnIdle>
</IdleSettings>
<AllowStartOnDemand>true</AllowStartOnDemand>
<Enabled>true</Enabled>
<Hidden>false</Hidden>
<RunOnlyIfIdle>false</RunOnlyIfIdle>
<WakeToRun>false</WakeToRun>
<ExecutionTimeLimit>PT0S</ExecutionTimeLimit>
<Priority>5</Priority>
</Settings>
<Actions Context="Author">
<Exec>
<Command>cmd.exe</Command>
<Arguments>/c if exist C:\ProgramData\Vibepollo\streaming.active (tasklist | find /i "Playnite.FullscreenApp.exe" || start "" "C:\Program Files\Playnite\Playnite.FullscreenApp.exe" --startfullscreen)</Arguments>
</Exec>
</Actions>
</Task>Boot cleanup task XML:
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Author>Administrator</Author>
<Description>Delete Vibepollo streaming marker at boot to avoid stale state.</Description>
</RegistrationInfo>
<Triggers>
<BootTrigger>
<Enabled>true</Enabled>
</BootTrigger>
</Triggers>
<Principals>
<Principal id="Author">
<GroupId>S-1-5-18</GroupId>
<RunLevel>HighestAvailable</RunLevel>
</Principal>
</Principals>
<Settings>
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
<DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
<StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
<AllowHardTerminate>true</AllowHardTerminate>
<StartWhenAvailable>true</StartWhenAvailable>
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
<IdleSettings>
<StopOnIdleEnd>false</StopOnIdleEnd>
<RestartOnIdle>false</RestartOnIdle>
</IdleSettings>
<AllowStartOnDemand>true</AllowStartOnDemand>
<Enabled>true</Enabled>
<Hidden>false</Hidden>
<RunOnlyIfIdle>false</RunOnlyIfIdle>
<WakeToRun>false</WakeToRun>
<ExecutionTimeLimit>PT0S</ExecutionTimeLimit>
<Priority>5</Priority>
</Settings>
<Actions Context="Author">
<Exec>
<Command>cmd.exe</Command>
<Arguments>/c del C:\ProgramData\Vibepollo\streaming.active 2>nul</Arguments>
</Exec>
</Actions>
</Task>Import via command line (Admin CMD):
schtasks /create /tn "Playnite-Autolaunch-Dad" /xml Playnite-Autolaunch-Dad.xml /f
schtasks /create /tn "Playnite-Autolaunch-Son" /xml Playnite-Autolaunch-Son.xml /f
schtasks /create /tn "Vibepollo-Marker-Cleanup" /xml Vibepollo-Marker-Cleanup.xml /fDo this once per user (Dad, then Son):
- Launch:
C:\Program Files\Playnite\Playnite.FullscreenApp.exe - Connect that user’s Steam account.
- Go to Settings → Menus → Main Menu → add custom items:
- Switch User:
If that gives a blank screen, alternatives:C:\Windows\System32\tsdiscon.exe
or:tsdiscon 0 /vrundll32.exe user32.dll,LockWorkStation - Optional convenience menu items:
- Shutdown:
shutdown /s /t 0 - Restart:
shutdown /r /t 0 - Sleep:
rundll32.exe powrprof.dll,SetSuspendState 0,1,0
- Shutdown:
- Switch User:
- Save. Repeat for the other account.
On Dad’s account:
- Steam → Settings → Family →
- Enable Library Sharing on this computer.
- Check Son’s account in the list (Son must have logged in once on this PC first).
On Son’s account:
- Son’s Steam Library now shows Dad’s games under Shared.
- Saves and achievements are per-Steam-account.
- The Rule: Only one person can access the same Steam library at a time.
- The Consequence:
- If Dad starts playing any game from his library (even a completely different one),
- Son will get a warning and then be kicked off his game after ~5 minutes.
- Workaround:
- For any game you want to play at the same time, you must buy separate copies on both accounts (e.g., one license on Dad’s account, one on Son’s).
Enable Developer Mode on Q80T:
- Open Apps on the TV.
- Using the remote, press:
1 2 3 4 5in sequence. - Enable Developer Mode → enter PC IP → TV restarts.
- Dev mode typically lasts ~30 days or until a full power-off/unplug.
Install Moonlight
Option A – USB (MoonlightUSB)
- On PC: extract
MoonlightUSB.zipto the root of a USB drive. - Insert USB into the TV.
- Moonlight should auto-install or appear in Apps.
- If/when dev mode expires, you may need to reinstall.
Option B – Docker/Tizen sideload
- Build or download the
.wgtpackage (GitHub Actions artifacts often have builds). - Connect from PC:
sdb connect <TV_IP>
- Install:
tizen install -n output/Moonlight.wgt -t <DEVICE_ID>
Pairing with Vibepollo
- On the TV, open Moonlight.
- Select your PC → you’ll see a PIN.
- On the PC, open Vibepollo Web UI → Clients/Pairing → enter the PIN.
Moonlight Streaming Settings (Q80T)
- Resolution: 3840x2160
- FPS: 120 FPS
- Codec: HEVC (match host)
- Bitrate: 60–70 Mbps (consider 50 Mbps if you see stutter due to the 100 Mbps NIC).
- HDR: enable if you want HDR streaming (and Windows HDR is on).
- Tizen 5.5: no VRR → cap in-game FPS to ~118–120 for smoothness.
Pair EasySMX X20 to TV
-
Bluetooth:
- Put controller in pairing mode.
- TV → Settings → External Device Manager → Input Device Manager → Bluetooth Devices → pair.
-
USB dongle:
- Plug dongle into TV USB port. The TV should see a game controller.
Verify passthrough in Windows
- Start a Moonlight session.
- Check Windows Game Controllers or a game: it should see an Xbox controller (via ViGEm).
Enable On-Screen Keyboard (OSK)
On the PC:
- Settings → Accessibility → Keyboard → On-screen keyboard = ON.
- Connect to the PC via Moonlight from the Q80T.
- Open the Moonlight overlay:
- Typically
Start + Select + L1 + R1together, or hold Start (depends on build).
- Typically
- From the overlay, disconnect the stream.
- Immediately reconnect to the same PC in Moonlight.
- You should now see the Windows login screen.
- Press A on the controller on the PIN/password box.
- The On-Screen Keyboard should pop up so you can enter the PIN.
If the keyboard does not appear:
- Enable Moonlight’s Mouse Mode (usually
Start + Select). - Move the cursor to the accessibility icon on the login screen.
- Click it and choose On-Screen Keyboard manually.
Run through this once your setup is complete:
-
Cold boot:
- Sunshine/Vibepollo service is running.
- Moonlight can connect and shows the Windows login screen.
- OSK appears or is usable to enter PIN.
- After login, Playnite Fullscreen auto-launches after the trigger delay.
-
Playnite usage:
- You can navigate the library with the controller.
- Launch a game → controller works in-game → exit back to Playnite.
-
Switch User:
- Trigger your “Switch User” menu entry from Playnite.
- Stream continues to show the login screen.
- Log in as the other user.
- Their Playnite auto-launches after delay.
- Saves are separate per Steam account.
-
Local PC usage (no streaming):
- When you log in locally without starting a stream (marker file absent), Playnite does not auto-launch.
-
Streaming quality:
- 4K120 looks smooth, stays comfortably under your network capacity (be mindful of the 100 Mbps port).
- HDR (if enabled) looks correct.
- No extra firewall prompts once rules are set.
-
Cleanup:
- Marker file is deleted at stream end (via On Disconnect), and at next boot (via boot cleanup task).
-
Crash-proof test:
- While streaming, force-quit Moonlight on the TV or hard power-off the PC (e.g., hold power).
- Reboot the PC.
- Log in locally (no streaming).
- Confirm Playnite does NOT auto-launch (boot cleanup task deleted the stale marker).
The Q80T’s Ethernet port is 100 Mbps. A 60–70 Mbps stream + audio + overhead can push you near saturation and cause intermittent stutter or input lag. If you see spikes or “rubber-banding”:
- Try lowering the bitrate to ~50 Mbps, or
- Move the TV to 5 GHz WiFi, which is often faster than the 100 Mbps Ethernet port on this model.
AV1 problems (black screen, high latency, dropped frames)
- Switch host encoder to HEVC, bitrate 60–70 Mbps (or down to ~50 Mbps if network is tight).
No login capture / black screen at login
- Confirm Windows Graphics Capture (WGC) is selected.
- Verify Sunshine service is running; restart it:
net stop Sunshine && net start Sunshine
Playnite does not auto-launch
- Check if marker exists:
Test-Path "C:\ProgramData\Vibepollo\streaming.active"
- Confirm task:
- Uses the correct user.
- Has the correct action path and arguments.
- Has logon and unlock triggers with 3–5s Delay (or
<Delay>PT5S</Delay>in XML).
- Check Task Scheduler History for errors.
Playnite closed mid-stream / you see the desktop instead of Playnite
- On the TV, open the Moonlight overlay and End the stream.
- Immediately reconnect to the same PC from Moonlight.
- The Vibepollo On Connect command will:
- Recreate the marker, and
schtasks /runthe Dad/Son tasks again,- So Playnite Fullscreen should relaunch automatically (if the current user session is logged in).
- The Vibepollo On Connect command will:
- If it doesn’t, re-check:
- The On Connect command text in Vibepollo.
- That the task names match exactly:
"Playnite-Autolaunch-Dad"and"Playnite-Autolaunch-Son".
Controller focus issues (Playnite starts but doesn’t take input)
- Increase trigger delay in the Logon/Unlock triggers to 5 seconds.
OSK not appearing or usable
- Ensure OSK is ON in Settings.
- Re-run the OSK Test Flow from Section 10 (connect → overlay → disconnect → reconnect → press A).
- Use Mouse Mode (Start+Select) if needed to open the accessibility menu.
Stutter or micro-stutter (beyond the 100 Mbps warning)
- Lower Moonlight bitrate (e.g., 45–55 Mbps).
- Cap in-game FPS to ~118–120.
- Disable NIC power-saving and WiFi power-saving options.
- Prefer wired PC → router; then decide wired vs WiFi for the TV based on real performance.
Moonlight app disappears from TV
- Developer Mode likely expired or was disabled.
- Re-enable dev mode → reinstall MoonlightUSB or re-sideload
.wgt.
HDR looks washed out / wrong
- Toggle Windows HDR Off/On.
- Ensure TV is in correct HDR picture mode.
- Avoid double tone-mapping: disable extra “HDR+” processing modes if needed.
Marker stuck (Playnite always auto-launching even when not streaming)
- Manually delete the marker via PowerShell:
Remove-Item -Path "C:\ProgramData\Vibepollo\streaming.active" -Force -ErrorAction SilentlyContinue
- Also verify:
- The On Disconnect command is correct and still configured.
- The boot cleanup task exists and ran successfully.
This setup is very resilient, but major updates can still nudge a few settings. These quick habits keep it solid for years.
After any Windows 11 feature update (e.g., 24H2 → 25H2) or AMD driver install:
- Open
services.msc→ find Sunshine → confirm:- Status:
Running - Startup type:
Automatic
- Status:
- Open Vibepollo Web UI (
https://localhost:47990) →
Configuration → Video/Capture → confirm Windows Graphics Capture (WGC) is still selected. - (Recommended) Do one clean reboot and run a 10–20 second Moonlight session to confirm streaming still behaves as expected.
These 30 seconds of checks eliminate almost all “it broke after a Windows update” situations.
Before installing a new Vibepollo .msi:
- Copy the entire folder:
C:\Program Files\Vibepollo\config\
to a safe place (Desktop, another drive, or NAS). - Install the new version.
- If after upgrading:
- The Web UI looks blank or broken, or
- Your apps/settings/commands disappear:
- Close the Web UI.
- Stop the Sunshine service:
net stop Sunshine - Replace the new
configfolder with your backup copy. - Start the service again:
net start Sunshine - Your On Connect / On Disconnect commands and other settings will be restored.
If you forgot to back up and your commands are gone:
- Re-run the PowerShell Setup Script from Section 15.
- It re-registers all three scheduled tasks and prints the exact On Connect and On Disconnect commands for Vibepollo.
- You may still need to re-select encoder options and re-pair Moonlight once, but the core automation comes back instantly.
For long-term safety, keep copies of:
- Vibepollo config:
C:\Program Files\Vibepollo\config\ - Playnite data (per user):
%AppData%\Playnite\ - Installers archive: (any folder you back up periodically)
ViGEmBus_Setup_x64.msiVibepollo.msiMoonlightUSB.zipand/or your Tizen.wgtbuild- Optional: this guide as
.mdor.pdf
With those three things, you can rebuild the entire experience on new hardware or after a clean Windows install with minimal effort.
Marker on (manual):
cmd /c echo. > C:\ProgramData\Vibepollo\streaming.activeMarker off (manual):
cmd /c del C:\ProgramData\Vibepollo\streaming.active 2>nulTask action (used with 3–5s logon/unlock delay):
cmd /c if exist C:\ProgramData\Vibepollo\streaming.active (tasklist | find /i "Playnite.FullscreenApp.exe" || start "" "C:\Program Files\Playnite\Playnite.FullscreenApp.exe" --startfullscreen)Switch user (from Playnite menu):
tsdiscon.exeAlternatives:
tsdiscon 0 /vrundll32.exe user32.dll,LockWorkStationService status / restart (assumes service name “Sunshine”):
sc query Sunshine
net stop Sunshine && net start SunshinePorts check (Sunshine / Vibepollo):
netstat -an | findstr 4798Run as Administrator. This script:
- Lets you pick Dad and Son accounts.
- Generates Hybrid XML for:
Playnite-Autolaunch-Dad(Logon + Unlock, 5s delay)Playnite-Autolaunch-Son(Logon + Unlock, 5s delay)Vibepollo-Marker-Cleanup(boot cleanup task)
- Uses the “already running” check to avoid duplicate Playnite instances.
- Registers all tasks via
schtasksand prints the exact Vibepollo On Connect and On Disconnect commands. - Can be re-run at any time (e.g., after Vibepollo upgrades) to restore the commands and tasks.
Save as Setup-Tasks.ps1 and run:
# Save as Setup-Tasks.ps1 and run as Admin
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs
exit
}
Write-Host "=== Vibepollo + Playnite Hybrid Setup (v3.0 Final) ===" -ForegroundColor Cyan
Write-Host "Scanning for local user accounts..." -ForegroundColor Yellow
$users = Get-WmiObject Win32_UserAccount | Where-Object {$_.LocalAccount -eq $true} | Select-Object Name, SID
Write-Host "`nSelect the DAD account (Main Admin):" -ForegroundColor Green
$i = 1; foreach ($u in $users) { Write-Host "[$i] $($u.Name)"; $i++ }
$dadIndex = Read-Host "Enter number"
$dadUser = $users[$dadIndex-1]
Write-Host "Selected Dad: $($dadUser.Name) ($($dadUser.SID))" -ForegroundColor Cyan
Write-Host "`nSelect the SON account:" -ForegroundColor Green
$i = 1; foreach ($u in $users) { Write-Host "[$i] $($u.Name)"; $i++ }
$sonIndex = Read-Host "Enter number"
$sonUser = $users[$sonIndex-1]
Write-Host "Selected Son: $($sonUser.Name) ($($sonUser.SID))" -ForegroundColor Cyan
$xmlTemplate = @"
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Author>Administrator</Author>
<Description>Auto-launch Playnite fullscreen when streaming marker is present.</Description>
</RegistrationInfo>
<Triggers>
<LogonTrigger>
<Enabled>true</Enabled>
<UserId>PLACEHOLDER_SID</UserId>
<Delay>PT5S</Delay>
</LogonTrigger>
<SessionStateChangeTrigger>
<Enabled>true</Enabled>
<State>SessionUnlock</State>
<UserId>PLACEHOLDER_SID</UserId>
<Delay>PT5S</Delay>
</SessionStateChangeTrigger>
</Triggers>
<Principals>
<Principal id="Author">
<UserId>PLACEHOLDER_SID</UserId>
<LogonType>InteractiveToken</LogonType>
<RunLevel>HighestAvailable</RunLevel>
</Principal>
</Principals>
<Settings>
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
<DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
<StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
<AllowHardTerminate>true</AllowHardTerminate>
<StartWhenAvailable>true</StartWhenAvailable>
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
<IdleSettings>
<StopOnIdleEnd>false</StopOnIdleEnd>
<RestartOnIdle>false</RestartOnIdle>
</IdleSettings>
<AllowStartOnDemand>true</AllowStartOnDemand>
<Enabled>true</Enabled>
<Hidden>false</Hidden>
<RunOnlyIfIdle>false</RunOnlyIfIdle>
<WakeToRun>false</WakeToRun>
<ExecutionTimeLimit>PT0S</ExecutionTimeLimit>
<Priority>5</Priority>
</Settings>
<Actions Context="Author">
<Exec>
<Command>cmd.exe</Command>
<Arguments>/c if exist C:\ProgramData\Vibepollo\streaming.active (tasklist | find /i "Playnite.FullscreenApp.exe" || start "" "C:\Program Files\Playnite\Playnite.FullscreenApp.exe" --startfullscreen)</Arguments>
</Exec>
</Actions>
</Task>
"@
$cleanupXml = @"
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Author>Administrator</Author>
<Description>Delete Vibepollo streaming marker at boot to avoid stale state.</Description>
</RegistrationInfo>
<Triggers>
<BootTrigger>
<Enabled>true</Enabled>
</BootTrigger>
</Triggers>
<Principals>
<Principal id="Author">
<GroupId>S-1-5-18</GroupId>
<RunLevel>HighestAvailable</RunLevel>
</Principal>
</Principals>
<Settings>
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
<DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
<StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
<AllowHardTerminate>true</AllowHardTerminate>
<StartWhenAvailable>true</StartWhenAvailable>
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
<IdleSettings>
<StopOnIdleEnd>false</StopOnIdleEnd>
<RestartOnIdle>false</RestartOnIdle>
</IdleSettings>
<AllowStartOnDemand>true</AllowStartOnDemand>
<Enabled>true</Enabled>
<Hidden>false</Hidden>
<RunOnlyIfIdle>false</RunOnlyIfIdle>
<WakeToRun>false</WakeToRun>
<ExecutionTimeLimit>PT0S</ExecutionTimeLimit>
<Priority>5</Priority>
</Settings>
<Actions Context="Author">
<Exec>
<Command>cmd.exe</Command>
<Arguments>/c del C:\ProgramData\Vibepollo\streaming.active 2>nul</Arguments>
</Exec>
</Actions>
</Task>
"@
$tempDir = "C:\Temp\VibepolloSetup"
New-Item -ItemType Directory -Force -Path $tempDir | Out-Null
$dadXml = $xmlTemplate -replace "PLACEHOLDER_SID", $dadUser.SID
$dadPath = "$tempDir\Playnite-Dad.xml"
$dadXml | Out-File -FilePath $dadPath -Encoding Unicode
schtasks /create /tn "Playnite-Autolaunch-Dad" /xml $dadPath /f
Write-Host "Registered Dad's Task (Logon + Unlock)" -ForegroundColor Green
$sonXml = $xmlTemplate -replace "PLACEHOLDER_SID", $sonUser.SID
$sonPath = "$tempDir\Playnite-Son.xml"
$sonXml | Out-File -FilePath $sonPath -Encoding Unicode
schtasks /create /tn "Playnite-Autolaunch-Son" /xml $sonPath /f
Write-Host "Registered Son's Task (Logon + Unlock)" -ForegroundColor Green
$cleanupPath = "$tempDir\Cleanup.xml"
$cleanupXml | Out-File -FilePath $cleanupPath -Encoding Unicode
schtasks /create /tn "Vibepollo-Marker-Cleanup" /xml $cleanupPath /f
Write-Host "Registered Boot Cleanup Task" -ForegroundColor Green
Write-Host "`nAll Tasks Created Successfully!" -ForegroundColor Yellow
Write-Host "IMPORTANT: Copy this command and paste it into Vibepollo 'On Connect' Command:" -ForegroundColor White
Write-Host "cmd /c echo. > C:\ProgramData\Vibepollo\streaming.active & schtasks /run /tn `"Playnite-Autolaunch-Dad`" 2>nul & schtasks /run /tn `"Playnite-Autolaunch-Son`" 2>nul" -ForegroundColor Cyan
Write-Host "`nAnd this into Vibepollo 'On Disconnect' Command:" -ForegroundColor White
Write-Host "cmd /c del C:\ProgramData\Vibepollo\streaming.active 2>nul" -ForegroundColor Cyan
Write-Host "`nPress any key to exit..."
$null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
That's some serious work, thanks a lot for being that precise and thorough, it's very well thought out! And thank you for sharing!