10 lines
482 B
PowerShell
10 lines
482 B
PowerShell
# Registers the tray GUI to autostart at logon via the Run registry key.
|
|
$ErrorActionPreference = "Stop"
|
|
$root = Split-Path -Parent $PSScriptRoot
|
|
$exe = Join-Path $root "tools\publish\Tray\JournalBot.Tray.exe"
|
|
if (-not (Test-Path $exe)) { throw "Build first: scripts\build-tools.ps1" }
|
|
|
|
$runKey = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Run"
|
|
Set-ItemProperty -Path $runKey -Name "JournalBotTray" -Value "`"$exe`""
|
|
Write-Host "Tray app registered at logon. Start now: $exe"
|