I'm using PSExec in a test machine environment to start the setup package of the application to be tested as administrator, and then run tests as administrator where needed. PSExec is only used for the "run as" part here, no remote execution. The call looks like this:
c:\psexec -u Administrator -p adminpassword -w C:\SystemTests C:\SystemTests\run_system_tests.cmd ...
The problem is that Jenkins, our CI server, only captures PSExec's logo in the console output, but not the actual test printout:
PsExec v1.98 - Execute processes remotely
Copyright (C) 2001-2010 Mark Russinovich
Sysinternals - www.sysinternals.com
C:\SystemTests\run_system_tests.cmd exited with error code 0.
The started script opens its own console window locally and prints everything in there. But it's not logged in Jenkins so we won't know what the script did and why things may have failed.
Is there an option to make PSExec print the started program's output to stdout, instead of the logo, and not open a console window?
type filename
) after psexec - and shell redirection cannot be used with psexec?tee
(if it's availabe for Windows) also generally requires redirection (which seems to be the issue here) and only adds the feature to get output on both, display and file. I only need the file, the desktop is unattended anyway. // Update: Actually I don't want the file, but the stdout to be captured...