This shows you the differences between two versions of the page.
userspace:check_nullsoft-exitcode [2011/10/26 20:20] Stone [check_innosetup-exitcode.ins] |
userspace:check_nullsoft-exitcode [2021/08/23 08:37] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== check_nullsoft-exitcode ====== | ||
- | Script by Der-Matze \\ | ||
- | Comments and improvements welcome \\ | ||
- | Tested with opsi 4.0.1 \\ | ||
- | Tested with opsi-winst 4.10.x - 4.11.1.6 \\ | ||
- | Tested with Windows XP Professional and Windows 7 Enterprise x64 \\ | ||
- | |||
- | Subscript that checks all available nullsoft exitcodes, writes the definition of the encountered exitcode to the logfile and determines if the installation was successful or not. \\ | ||
- | Makes debugging installations easier and assures that failed installations show up as failed in configed. \\ | ||
- | |||
- | Usage: \\ | ||
- | |||
- | <code winst> | ||
- | |||
- | Winbatch_Install | ||
- | |||
- | sub " | ||
- | |||
- | </ | ||
- | |||
- | |||
- | |||
- | ==== check_nullsoft-exitcode ==== | ||
- | |||
- | <code winst> | ||
- | |||
- | ;Den ExitCode des Installers abfragen | ||
- | set $ExitCode$ = getLastExitCode | ||
- | |||
- | |||
- | |||
- | ;Loglevel anpassen | ||
- | setLogLevel = 4 | ||
- | |||
- | |||
- | |||
- | ;Den ExitCode auswerten | ||
- | |||
- | if ($ExitCode$ = " | ||
- | setLogLevel = 5 | ||
- | comment " | ||
- | setLogLevel = 4 | ||
- | |||
- | endif | ||
- | |||
- | |||
- | |||
- | if ($ExitCode$ = " | ||
- | |||
- | setLogLevel = 5 | ||
- | logError " | ||
- | isFatalError | ||
- | |||
- | endif | ||
- | |||
- | |||
- | |||
- | if ($ExitCode$ = " | ||
- | |||
- | setLogLevel = 5 | ||
- | logError " | ||
- | isFatalError | ||
- | |||
- | endif | ||
- | |||
- | |||
- | |||
- | ;Loglevel anpassen | ||
- | setLogLevel = 6 | ||
- | |||
- | </ |