I have Deploy.ps1 that runs this line of code:
psexec \machineName -i 1 -w c:\ -u domain\username -p password “C:\startup.bat”
When testing this line in the Script Console it has exit code zero, but passes as Success. As soon as its in the Deploy.ps1 it refuses to pass, even though the script is exactly the same. The script is actually running successfully, but its causing the deploy to fail? I have tried chain calling psexec into opening new command windows, supressing stderr and stdout by routing to a text file, and every other combination I can think of to bypass this failure from return code of zero. Is there a better was to start up a console applications?
I’m on v 2.4.8.107
The reason I’m using psexec is that I have to start the console app in a specific windows session.
This is from the script run management console:
PsExec v2.11 - Execute processes remotely Error 13:20:14
Copyright (C) 2001-2014 Mark Russinovich Error 13:20:14
Sysinternals - www.sysinternals.com Error 13:20:15
Connecting to local system... Error 13:20:15
Starting PSEXESVC service on local system... Error 13:20:15
Connecting with PsExec service on server01... Error 13:20:15
Starting C:\startup.bat on server01.. Error 13:20:15
C:\startup.bat exited on server01 with error code 0 Info 13:20:15
==============================================
PowerShell exit code: 0 Warning 13:20:15
==============================================
The script returned an exit code of 0, but output was written to the error output stream. Please investigate any errors in the script output above.
this is from the Deploy.ps1 after octopus run
PsExec v2.11 - Execute processes remotely Error 12:02:49
Copyright (C) 2001-2014 Mark Russinovich Error 12:02:49
Sysinternals - www.sysinternals.com Error 12:02:49
Connecting to local system... Error 12:02:49
Starting PSEXESVC service on local system... Error 12:02:49
Connecting with PsExec service on server01... Error 12:02:49
Starting C:\startup.bat on server01... Error 12:02:49
C:\startup.bat exited on server01 with error code 0. Warning 12:02:49
The script returned an exit code of 0, but output was written to the error output stream. Please investigate any errors in the script output above Warning 12:02:49
One or more errors were encountered when running the script. Fatal 12:02:49 — THIS is the only difference that I can see.