tacticalrmm/scripts/removeagent.go

24 lines
403 B
Go
Raw Normal View History

2019-10-22 22:22:36 +00:00
package main
import(
"os/exec"
"os"
)
func main(){
unins_file := "C:\\Program Files\\TacticalAgent\\unins000.exe"
if fileExists(unins_file) {
c := exec.Command("cmd", "/C", unins_file, "/VERYSILENT", "/SUPPRESSMSGBOXES")
c.Run()
}
}
func fileExists(filename string) bool {
info, err := os.Stat(filename)
if os.IsNotExist(err) {
return false
}
return !info.IsDir()
}