I declared a variable LOGFILE with the location of log file, then after each important step such as checking pre-requisites, updating config etc I added a statement setting LOGGED variable, and then wrote that to LOGFILE as shown in the code below. Is this approach correct to log information as your installer runs or is there a better way? I read that we need to use <setup.exe> /l= path to log file. Where exactly do we provide these arguments? On command line?
When I do try something like the code below, it does create a file but when it hits 'Apply Install', it hangs. If I simply write the content of '$LOGGED$' to log.txt after 'Apply Install', log.txt gets created but remains empty. Any ideas?
Code: Select all
Set Variable LOGFILE to $TARGETDIR$\log.txt
.
.
.
Set Variable LOGGED as 'Running pre-requisite checks'
Write into Text File $LOGFILE$ from Value $LOGGED$ (at end of file)
.
.
.
Set Variable LOGGED to "Updating Config files"
Write into Text File $LOGFILE$ from Value $LOGGED$ (at end of file)
.
.
.
Set Variable LOGGED to "SERVERADDRESS = " SERVERADDRESS
Write into Text File $LOGFILE$ from Value $LOGGED$ (at end of file)

