Files
FireflyGo_Proxy/run_admin_windows.go
AzenKain 9d769ed08c
Some checks failed
Build and Release / release (push) Failing after 26s
init
2025-12-12 17:37:34 +07:00

16 lines
278 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()
}