mirror of
https://github.com/myronblair/jarvis
synced 2026-06-30 17:50:23 -05:00
b19ce85d84
Replace the scheduled-task approach (required user to stay logged in) with a proper Windows Service using pywin32. The service runs as LocalSystem, starts at boot, and auto-restarts on failure — no PowerShell window needed. Agent changes (jarvis-agent-windows.py): - Add Windows Service class via pywin32 (JarvisAgentService) - Cleanly handles SvcStop by setting a threading.Event - main() loop uses _stop_event.wait() instead of time.sleep() so stop is immediate - self_update() signals the stop event when running as a service (SCM restarts it) - __main__ block dispatches to SCM entry point or HandleCommandLine (install/stop/remove) - Falls back to direct run if pywin32 not installed (for debugging) Installer changes (install-windows.ps1): - pip install pywin32 + postinstall (registers service runner DLLs) - Python search prefers system-wide install (accessible by LocalSystem) - Downloads Python 3.11 directly from python.org for Win 8.1 machines without winget - Removes legacy JARVIS-Agent scheduled task if present - Registers JARVISAgent service with --startup auto - Configures sc.exe failure recovery (restart at 5s/10s/30s) - Updated management commands in summary (Start-Service, Stop-Service, etc.) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 lines
65 B
Plaintext
2 lines
65 B
Plaintext
974c117db29ae2cc417cf70046af32a688037b887bb08b17a18b1a0be37dec6f
|