当我尝试通过 golang 静默安装 Microsoft Redistributable 软件包时,出现此错误
**
fork/exec C:\Windows2008R2.exe:请求的操作需要提升。
**
我的代码如下
package main
import (
"fmt"
"os/exec"
)
func main() {
co := exec.Command("C:\\Windows2008R2.exe","/q","/c:\"msiexec","/i","Windows2008R2.msi","/qn","/l*v","C:\\Windows2008R2_x64.log\"")
if err := co.Run(); err != nil {
fmt.Println("Error: ", err)
}
}
哔哔one
相关分类