From 557efb952abe6a22b12f945dd1c649445b573991 Mon Sep 17 00:00:00 2001 From: "heidi.ngew" Date: Thu, 22 Dec 2022 15:58:36 -0500 Subject: [PATCH] fix: start cmd in full path --- open/exec_windows.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/open/exec_windows.go b/open/exec_windows.go index 583425e..b3a1247 100644 --- a/open/exec_windows.go +++ b/open/exec_windows.go @@ -12,7 +12,7 @@ import ( var ( cmd = "url.dll,FileProtocolHandler" - runDll32 = filepath.Join(os.Getenv("SYSTEMROOT"), "System32", "rundll32.exe") + // start = filepath.Join(os.Getenv("SYSTEMROOT"), "System32", "start.exe") ) func cleaninput(input string) string { @@ -21,7 +21,7 @@ func cleaninput(input string) string { } func open(input string) *exec.Cmd { - cmd := exec.Command("start", "/wait", input) + cmd := exec.Command("cmd", "/C", "start", "/wait", cleaninput(input)) //cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true} return cmd }