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
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 linux驱动,linux应用,多线程
  • ¥20 我要一个分身加定位两个功能的安卓app
  • ¥15 基于FOC驱动器,如何实现卡丁车下坡无阻力的遛坡的效果
  • ¥15 IAR程序莫名变量多重定义
  • ¥15 (标签-UDP|关键词-client)
  • ¥15 关于库卡officelite无法与虚拟机通讯的问题
  • ¥15 目标检测项目无法读取视频
  • ¥15 GEO datasets中基因芯片数据仅仅提供了normalized signal如何进行差异分析
  • ¥100 求采集电商背景音乐的方法
  • ¥15 数学建模竞赛求指导帮助