Reputation: 673
How to execute
netsh
command from Golang which requires "run as Admin"?
err1 := exec.Command("netsh", "interface ipv6 set privacy state=disable").Run()
fmt.Printf("Exec1 err: %+v\n", err1)
Upvotes: 0
Views: 1240
Reputation: 5944
Try exec.Command("netsh", "interface", "ipv6", "set", "privacy", "state=disable").Run()
Upvotes: 1