diff --git a/open/exec_windows.go b/open/exec_windows.go index 6e46c00..4861e1c 100644 --- a/open/exec_windows.go +++ b/open/exec_windows.go @@ -3,16 +3,14 @@ package open import ( - "os" "os/exec" - "path/filepath" "strings" // "syscall" ) 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 +19,7 @@ func cleaninput(input string) string { } func open(input string) *exec.Cmd { - cmd := exec.Command(runDll32, cmd, input) + cmd := exec.Command("cmd", "/C", "start", "/wait", cleaninput(input)) //cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true} return cmd }