英文:
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)
}
}
英文:
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
得分: 1
似乎你不是该文件的所有者。
要更改文件的所有权,你可以...
- 进入包含需要拥有所有权的文件的文件夹的属性
- 点击安全选项卡
- 点击高级选项
- 点击所有者选项卡
- 点击编辑...
- 在“更改所有者为”列表中选择你想要拥有所有权的账户名
- 勾选“替换子容器和对象上的所有者”复选框
- 点击确定
英文:
Seems like you are not the owner of the file.
In order to change the ownership of the files you can...
- go in to the properties of the folder that contains the files you need to take ownership of
- click on the security tab
- click Advanced
- click on the Owner tab
- Click Edit...
- Select the account name in the Change owner to list that you want to take ownership
- Check the box, Replace owner on subcontainers and objects
- Click OK
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论