我尝试使用 GUID 卸载产品,当我在命令提示符下直接执行它时效果很好,但是,当我尝试使用 Golang 执行它时收到错误消息
我的代码:
// 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))
}
输出是:
错误:: 退出状态 2147749911
出去::
提前致谢
慕码人2483693
相关分类