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
+6 -2
View File
@@ -1,12 +1,16 @@
Option Explicit
Dim shell
Dim fso
Dim projectPath
Dim launcherPath
Dim command
Set shell = CreateObject("WScript.Shell")
projectPath = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName)
command = "cmd.exe /c cd /d """ & projectPath & """ && uv run kvm-switch"
Set fso = CreateObject("Scripting.FileSystemObject")
projectPath = fso.GetParentFolderName(WScript.ScriptFullName)
launcherPath = fso.BuildPath(projectPath, "start_kvm_switch.cmd")
command = "cmd.exe /c """ & launcherPath & """"
' Run hidden and do not wait.
shell.Run command, 0, False