fix UAC elevation in go script
This commit is contained in:
parent
6f7c02c9dc
commit
d118eb514c
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue