fix: start cmd in full path

This commit is contained in:
heidi.ngew 2022-12-22 15:58:36 -05:00
parent e1194fff66
commit 557efb952a
No known key found for this signature in database
GPG Key ID: 03C9B99A7BFFC435
1 changed files with 2 additions and 2 deletions

View File

@ -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
}