Results 1 to 4 of 4

Thread: Exit code from a batch file?

  1. #1
    Join Date
    Jun 2008
    Posts
    96

    Exit code from a batch file?

    Hi,

    I want to get the exit code from a batch file that i have executed.
    I don't know how to do this? Please I need your help regarding the same!

  2. #2
    Join Date
    Nov 2005
    Posts
    3,026

    Re: Exit code from a batch file?

    How to close batch files

    Even our favourite batch files will, at some time, need to quit.
    Sometimes they need to quit based on a condition that has been or has not been met. And every batch file needs to quit, and will do so, when it reaches the last line of code.

    There are several ways to end batch file execution, like reaching the end of the batch file, starting execution of another batch file, or using the EXIT or GOTO:EOF commands.

    Each operating system may react in its own way to any of these events.
    And often there is a difference between ending batch file execution and closing the batch file's console (window).

  3. #3
    Join Date
    Jan 2009
    Posts
    10

    Re: Exit code from a batch file?

    The java program
    when executed, Runtime.exec() always returns me exit code of 0 where as it should return 44. The same works on windows 2003 which is strange. I havent found a way to get around this problem.

    Any help on this is appreciated.

  4. #4
    Join Date
    Apr 2008
    Posts
    3,522

    Re: Exit code from a batch file?

    Please refer to this webpage I hope this helps you!

    http://blog.borngeek.com/2008/05/22/...le-exit-codes/

Similar Threads

  1. Running a batch file from a remote machine in a VB code
    By Radhu in forum Software Development
    Replies: 1
    Last Post: 14-10-2011, 04:54 PM
  2. Java code to run batch file
    By Beverly Archer in forum Software Development
    Replies: 4
    Last Post: 31-03-2010, 02:17 PM
  3. How to exit a Windows MS-DOS window through a batch file.
    By Juaquine in forum Operating Systems
    Replies: 4
    Last Post: 27-03-2010, 05:31 PM
  4. A Simple File and Folder renaming batch code : RenameR
    By Rudra.J in forum Tips & Tweaks
    Replies: 2
    Last Post: 05-03-2009, 02:59 PM
  5. Can We check the exit command in the batch file
    By Dhruv in forum Software Development
    Replies: 3
    Last Post: 30-12-2008, 11:56 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,710,815,032.06749 seconds with 16 queries