Return codes are nothing but the errorlevels. The DOS command to determine the return code is IF ERRORLEVEL.
Errorlevels are not a standard feature of every command. A certain errorlevel may mean anything the programmer wanted it to. Most programmers agree that an errorlevel 0 means the command executed successfully, and an errorlevel 1 or higher usually spells trouble. But there are many exceptions to this general rule.
In Wise script the Variable used for getting the return code of an installation is %INSTALL_RESULT%