安装 Microsoft Visual c++ 2008 Redistributable 软件包时出现身份验证问题

Authentication Issue while installing Microsoft Visual c++ 2008 Redistributable package

当我尝试通过 golang 静默安装 Microsoft Redistributable 包时出现此错误

**

fork/exec C:\Windows2008R2.exe: The requested operation requires elevation.

**

而我的代码如下

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)
    }  
}

您似乎不是该文件的所有者。 要更改文件的所有权,您可以...

  1. 进入包含您需要取得所有权的文件的文件夹的属性
  2. 单击安全选项卡
  3. 点击高级
  4. 单击所有者选项卡
  5. 单击编辑...
  6. Select 将所有者更改为列表中您想获得所有权的帐户名称
  7. 选中复选框,替换子容器和对象的所有者
  8. 点击确定