Files
AetherForge/agent/deploy/priority_windows.go
drjones 0f9e04f5f6 Add universal forge, fusion disguise, remote deploy, and stability fixes.
Ship cross-platform spread kits and fusion ZIPs with per-OS launchers, one-liner dropper endpoints, Windows file disguise, and a large batch of wiring/bug fixes so agents connect reliably across a LAN test fleet.
2026-05-29 20:53:13 -07:00

30 lines
529 B
Go

//go:build windows
package deploy
import (
"fmt"
"os"
"os/exec"
)
func SetProcessPriority(priority string) error {
class := "BelowNormal"
switch priority {
case "idle":
class = "Idle"
case "below_normal":
class = "BelowNormal"
case "normal":
class = "Normal"
case "above_normal":
class = "AboveNormal"
case "high":
class = "High"
}
pid := os.Getpid()
cmd := exec.Command("powershell", "-NoProfile", "-Command",
fmt.Sprintf("(Get-Process -Id %d).PriorityClass = '%s'", pid, class))
return cmd.Run()
}