$errmsg function

$errmsg([code])

The $errmsg function returns the Windows error message corresponding to the error code code. The code parameter is optional; if you leave it out, then the error message corresponding to <LastExitCode> is returned. This means that the following two calls are equivalent:

Note: The error message uses the current user's Windows language setting, regardless of the user interface language used in the installer.

Parameters

All parameters may contain symbolic references; these are resolved before the function is applied. See Examples below.

code
Windows error code for which to retrieve the corresponding error message. This parameter is optional; if you omit it, then the value of <LastExitCode> is used.

Examples

Here are some usage examples for this function:

<$errmsg()>
Returns the error message corresponding to the current <LastExitCode> value.
<$errmsg(<LastExitCode>)>
Same result as the previous example.
<$errmsg(5)>
Returns the Windows error message corresponding to Windows error #5 (ERROR_ACCESS_DENIED).