I have a build step that needs to execute a console app with a different user account with privileged access.
I created a .bat file that calls PsExec with the following arguments :
PsExec.exe -i -accepteula -u Username -p Password "MyConsoleApp.exe"
[15:51:09]PsExec v2.0 - Execute processes remotely
[15:51:09]Copyright (C) 2001-2013 Mark Russinovich
[15:51:09]Sysinternals - www.sysinternals.com
[15:51:09]MyConsoleApp.exe exited with error code -1073741502.
[15:51:09]Process exited with code -1073741502
I know it is not my app because I can call any executable it will return the exact same error code.
I have tried to set the Windows Account that runs the build agent service as administrator (temporarly) but it does not help.
Can anyone help ?