Enhance autostart setup with a one-command installer and improve script logic for KVM switch launch

This commit is contained in:
Lago
2026-03-27 16:32:06 +01:00
parent dc3b67d00a
commit 4721e386a0
4 changed files with 71 additions and 17 deletions
+16 -14
View File
@@ -56,22 +56,24 @@ uv run monitorcontrol_main.py
## Autostart
### Easiest option: Startup folder
### Recommended: one-command installer
From the project folder, run:
```powershell
powershell -ExecutionPolicy Bypass -File .\install_autostart.ps1
```
This creates or updates a Startup shortcut for the current Windows user and points it to this folder's `start_kvm_switch_background.vbs`.
No hardcoded `C:\Users\...` path is required, so it works across tower/laptop deployments.
### Manual option: Startup folder
1. Press `Win + R`
2. Run:
2. Run `shell:startup`
3. Create a shortcut to this repo's `start_kvm_switch_background.vbs`
```text
shell:startup
```
3. Create a shortcut in that folder pointing to:
```text
C:\Users\LagoWorkStation\OneDrive\Documentos\BE-terna\Internal - KVM Switch\start_kvm_switch_background.vbs
```
This starts the app at logon in the background (no persistent console window).
The launcher resolves its own folder dynamically, so the project can live in different user directories.
### Cleaner option: Task Scheduler
@@ -86,7 +88,7 @@ wscript.exe
Arguments:
```text
"C:\Users\LagoWorkStation\OneDrive\Documentos\BE-terna\Internal - KVM Switch\start_kvm_switch_background.vbs"
"<full-path-to-project>\\start_kvm_switch_background.vbs"
```
Set the trigger to `At log on`. Optional: enable `Hidden` in task settings.