Announcement

Collapse
No announcement yet.

Visual Patch Exit Testing

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Visual Patch Exit Testing

    We are having trouble with 2 things with Visual Patch 3.8.1.0:

    1. Application.Exit(number) – when we set the number to non-zero and test %errorlevel% from a MS-DOS prompt, it is always set to 0. Is this supported? When a script exits with a non-zero value, how do you test the exit code?

    2. Patch exiting with error – In general, how do we know if the patch program completed successfully. We do a set of checks in our action scripts before the patch program runs during the On Startup phase. Then the visual patch program runs. It may encounter a number of issues and not complete successfully. How do we check for this? Do we check the process return code (ie. %errorlevel%) for non-zero and if so, we were not able to get that to work (ie. it is always 0).

    I'm hoping these are very simple problems and we are just doing something wrong.



  • #2
    Hello, I do not see any issues with the exit code in Visual Patch. Perhaps you could test with this batch file?

    Code:
    @ECHO OFF
    
    REM Run patch built with Visual Patch
    PATCH.EXE
    
    REM Check exit code
    GOTO JUMP%ERRORLEVEL%
    GOTO END
    
    :JUMP4
    ECHO Exit code is four
    GOTO END
    
    :JUMP3
    ECHO Exit code is three
    GOTO END
    
    :JUMP2
    ECHO Exit code is two
    GOTO END
    
    :JUMP1
    ECHO Exit code is one
    GOTO END
    
    :JUMP0
    ECHO Exit code is zero
    
    :END
    Ulrich
    Attached Files

    Comment

    Working...
    X