Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

mxcolin wrote:

Any plans for adding this in anytime soon?

Will consider it. Meanwhile you can dump the exit code to the command output and parse it out yourself.
mxcolin

Any plans for adding this in anytime soon?
mxcolin

Nuts :-(
martin

Re: Retrieve Exit Code from Session.ExecuteCommand

No, indeed there's no way to retrieve the exit code.
mxcolin

Retrieve Exit Code from Session.ExecuteCommand

I'm using ExecuteCommand on the Session class to call a command remotely however I cannot get at the exit code?

CommandExecutionResult result = session.ExecuteCommand(command.Executable + " " + command.Arguments);

Will throw a SessionRemoteException if the command fails but there's no way to know what the exit code is?

Thanks

Colin