Skip to content

Commit

Permalink
Merge pull request #151 from OCSInventory-NG/fix147
Browse files Browse the repository at this point in the history
Fix #147
  • Loading branch information
gillesdubois authored Nov 15, 2019
2 parents 4bfeecd + b0afe91 commit 743d442
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Agent/CapExecute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 743d442

Please sign in to comment.