From b0afe91af2b1f62b430b4dac9a930390402b4560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charl=C3=A8ne=20Auger?= Date: Wed, 6 Nov 2019 14:33:42 +0100 Subject: [PATCH] Fix #147 --- Agent/CapExecute.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Agent/CapExecute.cpp b/Agent/CapExecute.cpp index 5a30b1d1..7002fc7e 100644 --- a/Agent/CapExecute.cpp +++ b/Agent/CapExecute.cpp @@ -81,7 +81,7 @@ BOOL CCapExecute::execute( const int bScript, LPCTSTR lpstrPath) cmProcess.setOutputFile( csOutputFile); // Execute script if (bScript == PWSHELL){ - csCommand.Format(_T("C:\\Windows\\SysWOW64\\WindowsPowerShell\\v1.0\\powershell.exe -ExecutionPolicy Bypass -Command \"& {& '%s'; [Environment]::Exit(1)}\""), cFinder.GetFilePath()); + csCommand.Format(_T("C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -ExecutionPolicy Bypass -Command \"& {& '%s'; [Environment]::Exit(1)}\""), cFinder.GetFilePath()); } else if (bScript == VBS){ csCommand.Format(_T("cscript /nologo \"%s\""), cFinder.GetFilePath());