Enhance autostart setup with a one-command installer and improve script logic for KVM switch launch
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user