如何在 Windows 上从 Golang 执行 netsh 命令

How to execute netsh command from Golang on Windows

如何执行

netsh

来自 Golang 的命令需要 "run as Admin"?

err1 := exec.Command("netsh", "interface ipv6 set privacy state=disable").Run()
fmt.Printf("Exec1 err: %+v\n", err1)

尝试exec.Command("netsh", "interface", "ipv6", "set", "privacy", "state=disable").Run()