Hi I tried to uninstall a product using a GUID, it worked fine when I directly executed it in command prompt however, I get an error message when I try to execute it using Golang
My Code:
// Powershell_Command
package main
import (
"fmt"
"os/exec"
)
func main() {
out, err := exec.Command("cmd","/C","wmic","product","where","IdentifyingNumber=\"{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}\"","call","uninstall").Output()
fmt.Println("err::",err)
fmt.Println("out::",string(out))
}
the output is:
err:: exit status 2147749911
out::
Thanks in Advance