/
logging.miax.txt
39 lines (34 loc) · 1.77 KB
/
logging.miax.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Comment: ******************************************************************************
Comment: This Include Script runs an app with logging and displays the log upon failure
Comment: ******************************************************************************
Comment: ******************************
Comment: Pass these variables as input:
Comment: ******************************
Comment: $LOGGED_COMMAND$: Job to execute
Comment: $LOGGED_PARAMS$: All command line parameters
Comment: $COMMAND_DESCRIPTION$: Human readable description of job, $NEWLINE$ delimited detail line
Comment: ************
Comment: Return value
Comment: ************
Comment: 0 indicates success, other values indicate failure
Comment: If user selects Cancel upon failure, this script shall not return
Comment: Generate fresh file names
Generate GUID into Variable OUTPUT_LOG
Comment: Upate textual progress variable
Set Variable PROGRESSTEXT to $COMMAND_DESCRIPTION$
Parse String $COMMAND_DESCRIPTION$ into Variables COMMAND_DESCRIPTION and (Split at first occurrence of pattern)
Comment: Run task
Run Program capturing live console output $LOGGED_COMMAND$ $LOGGED_PARAMS$ (WAIT, log output to file $SUPPORTDIR$$OUTPUT_LOG$.txt, get result into variable LOGGED_RESULT)
if Variable ABORT Equals TRUE
Terminate Installation
end
if Variable LOGGED_RESULT not Equals 0
MessageBox: $TITLE$, $COMMAND_DESCRIPTION$ Failed!$NEWLINE$$NEWLINE$Please check your Internet connection, free disk space, and try again.$NEWLINE$$NEWLINE$Error code: $LOGGED_RESULT$$NEWLINE$$NEWLINE$Would you like to review the log file?
if Variable REVIEW Equals YES
Run Program $SUPPORTDIR$$OUTPUT_LOG$.txt
end
if Variable REVIEW Equals CANCEL
Terminate Installation
end
end
Return from Include Script with result $LOGGED_RESULT$