Files
FireflyGo_Proxy/run_admin_windows.go
T
2026-06-22 11:23:22 +07:00

16 lines
293 B
Go

//go:build windows
// +build windows
package main
import (
"os"
"os/exec"
)
func runWithAdmin(exePath string, env []string) error {
cmd := exec.Command("powershell", "Start-Process", exePath, "-Verb", "runAs")
cmd.Env = append(os.Environ(), env...)
return cmd.Start()
}