From 569a6662f08cbd2b53310c599e8ba4eb5ff727de Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Wed, 10 May 2023 18:56:49 -0700 Subject: [PATCH] don't use -File, breaks existing script args. will figure out another way to deal with spaces if using custom tmpdir --- agent/agent_windows.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/agent_windows.go b/agent/agent_windows.go index fd6fb19..50bd5f0 100644 --- a/agent/agent_windows.go +++ b/agent/agent_windows.go @@ -143,7 +143,7 @@ func (a *Agent) RunScript(code string, shell string, args []string, timeout int, switch shell { case "powershell": exe = getPowershellExe() - cmdArgs = []string{"-NonInteractive", "-NoProfile", "-ExecutionPolicy", "Bypass", "-File", tmpfn.Name()} + cmdArgs = []string{"-NonInteractive", "-NoProfile", "-ExecutionPolicy", "Bypass", tmpfn.Name()} case "python": exe = a.PyBin cmdArgs = []string{tmpfn.Name()}