Skip to content

Commit 557efb9

Browse files
committed
fix: start cmd in full path
1 parent e1194ff commit 557efb9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: open/exec_windows.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212

1313
var (
1414
cmd = "url.dll,FileProtocolHandler"
15-
runDll32 = filepath.Join(os.Getenv("SYSTEMROOT"), "System32", "rundll32.exe")
15+
// start = filepath.Join(os.Getenv("SYSTEMROOT"), "System32", "start.exe")
1616
)
1717

1818
func cleaninput(input string) string {
@@ -21,7 +21,7 @@ func cleaninput(input string) string {
2121
}
2222

2323
func open(input string) *exec.Cmd {
24-
cmd := exec.Command("start", "/wait", input)
24+
cmd := exec.Command("cmd", "/C", "start", "/wait", cleaninput(input))
2525
//cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true}
2626
return cmd
2727
}

0 commit comments

Comments
 (0)