mirror of
https://github.com/bunny-lab-io/Borealis.git
synced 2025-09-11 04:38:42 -06:00
Made Agent PS Windows Finally Invisible
This commit is contained in:
@@ -84,9 +84,10 @@ def run_elevated_powershell(paths, ps_content, log_name):
|
||||
sei.hwnd = None
|
||||
sei.lpVerb = "runas"
|
||||
sei.lpFile = "powershell.exe"
|
||||
sei.lpParameters = f"-NoProfile -ExecutionPolicy Bypass -File \"{stub_path}\""
|
||||
sei.lpParameters = f"-NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File \"{stub_path}\""
|
||||
sei.lpDirectory = paths["project_root"]
|
||||
sei.nShow = 1
|
||||
# Hide the elevated PowerShell window entirely (UAC prompt may still appear)
|
||||
sei.nShow = 0
|
||||
if not ctypes.windll.shell32.ShellExecuteExW(ctypes.byref(sei)):
|
||||
log_write(paths, log_name, "[ERROR] UAC elevation failed (ShellExecuteExW)")
|
||||
return 1
|
||||
|
Reference in New Issue
Block a user