package public

import(
    "os/exec"
	"github.com/lxn/walk"
	"strings"
)
func Execcmd_nowait(cmdargs  string){
	DebugLog(cmdargs)
	// exec.Command 
	// 只接受 shutdown,-s,-t,0  
	// 不接受 shutdown -s -t 0
	c := strings.Split(cmdargs," ")
	len := len(c)
	var err error
	switch len{
	case 1:
		err = exec.Command(c[0]).Start()
	case 2:
		err = exec.Command(c[0],c[1]).Start()
	case 3:
		err = exec.Command(c[0],c[1],c[2]).Start()
	case 4:
		err = exec.Command(c[0],c[1],c[2],c[3]).Start()
	case 5:
		err = exec.Command(c[0],c[1],c[2],c[3],c[4]).Start()
	}
	if err !=nil {
		DebugLog(err)
	}
}

func Msg(message  string)  {
	walk.MsgBox(*new(walk.Form), "提示", message, walk.MsgBoxIconInformation)	
}