With a login profile where the options for "Run scripts" and "Display results window" and "Close automatically" on the "Scripts" tab are checked, the login script results window is not closing automatically, but requires the user to press the "Close" button before the login script results window is cleared.
If the problem is being caused by an incorrect or non-working MAP statement, and you want the resulting error to be ignored, add this statement to the login script:
MAP ERRORS OFF
However, if the error is not being caused by the erroneous MAP statement itself, but by some other problem such as an invalid server being specified in the MAP statement, the MAP ERRORS OFF command will not suppress the error.
For example, an error reported after a failed mapping, such as:
LOGIN-LGNWNT32-890: The specified server is unknown.
Is actually an "attach error" (and would have been returned by using the actual ATTACH command in the login script), and isn't specific/unique to the MAP case. And would not be suppressed by the MAP ERRORS OFF, because it's not an error reported by MAP per se.
Certain errors in the login script can correctly cause the login script results window to not close automatically.