windows.go 216 B

12345678910111213
  1. // +build windows
  2. package util
  3. import (
  4. "fmt"
  5. "io/ioutil"
  6. "os"
  7. )
  8. func CreateShutdownScript() error{
  9. return ioutil.WriteFile("shutdown.bat", []byte(fmt.Sprintf("taskkill /pid %d -t -f", os.Getpid())), 0777)
  10. }