Results 1 to 2 of 2

Thread: How to check a programs exit code?

  1. #1

    Thread Starter
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Use errorlevel:
    Code:
    -- batch file --
    c:\myprog\myprog.exe %1
    if errorlevel 20 goto bad
    goto end
    
    bad:
    echo Program failed
    
    end:
    -- end batch file --
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  2. #2
    New Member
    Join Date
    May 2000
    Posts
    15
    How do you print out what the value of errorlevel is?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width