Add a Desktop and Start Menu launcher for the Comfy host agent.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-09-01 07:13:43 -05:00
co-authored by Cursor
parent 2635b8838c
commit b7c4f01f5e
3 changed files with 63 additions and 3 deletions
@@ -0,0 +1,26 @@
# 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