fix UAC elevation in go script

This commit is contained in:
wh1te909 2020-08-25 03:53:09 +00:00
parent 6f7c02c9dc
commit d118eb514c
1 changed files with 2 additions and 1 deletions

View File

@ -82,6 +82,7 @@ func main() {
tacrmm := "C:\\Program Files\\TacticalAgent\\tacticalrmm.exe" tacrmm := "C:\\Program Files\\TacticalAgent\\tacticalrmm.exe"
cmdArgs := []string{ cmdArgs := []string{
"/C", tacrmm,
"-m", "install", "--api", Api, "--client-id", "-m", "install", "--api", Api, "--client-id",
Client, "--site-id", Site, "--agent-type", Atype, Client, "--site-id", Site, "--agent-type", Atype,
"--power", Power, "--rdp", Rdp, "--ping", Ping, "--power", Power, "--rdp", Rdp, "--ping", Ping,
@ -101,7 +102,7 @@ func main() {
} }
fmt.Println("Installation starting.") fmt.Println("Installation starting.")
cmd := exec.Command(tacrmm, cmdArgs...) cmd := exec.Command("cmd.exe", cmdArgs...)
cmdReader, err := cmd.StdoutPipe() cmdReader, err := cmd.StdoutPipe()
if err != nil { if err != nil {