dozpox8752 2015-11-17 10:54
浏览 103
已采纳

安装Microsoft Visual c ++ 2008可再发行组件包时的身份验证问题

When i try to install Microsoft Redistributable package silently through golang i get this error

**

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

**

And my code is as follows

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条回答 默认 最新

  • duanqianpu6499 2015-11-17 11:17
    关注

    Seems like you are not the owner of the file. In order to change the ownership of the files you can...

    1. go in to the properties of the folder that contains the files you need to take ownership of
    2. click on the security tab
    3. click Advanced
    4. click on the Owner tab
    5. Click Edit...
    6. Select the account name in the Change owner to list that you want to take ownership
    7. Check the box, Replace owner on subcontainers and objects
    8. Click OK
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作