Three separate bugs in the VBS launcher wedged together:
1. The previous fix added a UTF-8 em-dash in a comment. wscript.exe
on Windows refused to execute the file with "Execution of the
Windows Script Host failed. (Not enough memory resources are
available to complete this operation.)" — a misleading error that
actually means "I could not parse this file as ANSI VBScript".
Fix: keep the file pure ASCII, convert to CRLF.
2. The launcher was invoking pythonw.exe. WshShell.Run spawning
pythonw.exe inside the wscript host exited immediately (no process,
no log). python.exe with WindowStyle=0 works reliably and matches
the pattern used by the Media Server sibling app's VBS launcher,
which has been running on this machine without issue.
3. The env vars (PYTHONPATH, WLED_CONFIG_PATH) must be set before the
child process spawns, otherwise config.py falls back to the CWD
default path that does not exist at install time.
The VBS launcher (used by Start Menu, desktop, and autostart shortcuts
created by the NSIS installer) ran pythonw.exe without setting any env
vars. LedGrab.bat sets PYTHONPATH and WLED_CONFIG_PATH; the VBS did not.
With CWD set to the install root, config.py fell through to its default
lookup (./config/default_config.yaml), which does not exist there — the
real file is at app/config/default_config.yaml. The server silently ran
with built-in defaults on every shortcut launch: no devices, wrong data
dir, nothing persisted where the user expected.
The fix uses WshShell.Environment("Process") to set env vars on the
current VBS process, which child processes spawned via .Run inherit.
Kept CurrentDirectory = appRoot to preserve prior behavior for anyone
depending on CWD-relative paths inside the app.
Add pystray-based system tray icon with Open UI / Restart / Quit
actions. Add __main__.py for `python -m wled_controller` support.
Update start-hidden.vbs with embedded Python fallback for both
installed and dev environments.