Ghost Solution Suite

 View Only
  • 1.  Return Status from an Executed script

    Posted Aug 30, 2007 08:15 AM
    I want to be able to tell the ghost console I had a failure or warning during an Execute task.
    So if I create a script that I transfer to a machine and execute and I have a failure I would like the task to fail.
    What happens now is I get a success in the task.
     
    In XP you can use a batch script and use the command EXIT num.
    So I can do error checking in my script and if I run into a problem or an error during my script I can use EXIT 1 and that will set ERRORCODE to 1.
     
    Most commands use ERRORCODE as a way to return a success or failure.
    Execute tasks seem to be only pick up if the file/script exists, not whether it was successful or not.
     
    Is there any environment variable or some other way I can make the Execute task return a failure/warning?


    Message Edited by Mark Berning on 08-30-2007 08:15 AM


  • 2.  RE: Return Status from an Executed script

    Posted Aug 30, 2007 09:10 AM
    We were discussing this today - no there isn't a way at present, yes this is lame. I've also wanted for years to capture stdout/stderr from executed commands (by default, you could still redirect elsewhere) and pass them back into the task log. We really want to fix not only this, but the related problem of controlling the order of steps and be able to have file transfers easily go both ways.

    All of this is mostly just UI - I've considered adding various kinds of metacharacters to the command strings to specify alternative behaviours so I can get this in without the pain of having to request a UI change, but until we can have an actual tickbox in the UI it's still lame.