# Installs Desktop + Start Menu shortcuts that start the Comfy host agent # without Cursor. The scheduled task still starts the agent at logon. $ErrorActionPreference = 'Stop' $root = (Resolve-Path (Join-Path $PSScriptRoot '..')).Path $vbs = Join-Path $root 'scripts\launch-comfy-host-agent.vbs' if (-not (Test-Path $vbs)) { throw "Missing $vbs" } $shell = New-Object -ComObject WScript.Shell $desktop = [Environment]::GetFolderPath('Desktop') $programs = Join-Path ([Environment]::GetFolderPath('StartMenu')) 'Programs\AIGen' New-Item -ItemType Directory -Force -Path $programs | Out-Null function Save-Shortcut([string]$dir) { $path = Join-Path $dir 'Start Comfy Host Agent.lnk' $lnk = $shell.CreateShortcut($path) $lnk.TargetPath = (Join-Path $env:SystemRoot 'System32\wscript.exe') $lnk.Arguments = "//B `"$vbs`"" $lnk.WorkingDirectory = $root $lnk.WindowStyle = 7 $lnk.Description = 'Start the AIGen Comfy host agent in the background' $lnk.Save() $path } Save-Shortcut $desktop Save-Shortcut $programs