Example.nsi 781 B

123456789101112131415161718192021222324
  1. Name "LogEx Example"
  2. OutFile "LogEx.exe"
  3. ShowInstDetails show
  4. Page InstFiles
  5. Section
  6. LogEx::Init "$TEMP\log.txt"
  7. LogEx::Write "Write this line to the log file only"
  8. LogEx::Write true "Write this line to the log file and the status list box"
  9. LogEx::Write true true "Write this line to the log file, the status list box and the statusbar"
  10. ExecDos::exec 'cmd /C dir' "" "$TEMP\output.log"
  11. LogEx::Write 'Write complete "dir" output to the log file with ">" as prefix'
  12. LogEx::AddFile " >" "$TEMP\output.log"
  13. LogEx::Write 'Write "dir" output from line3 to the log file'
  14. LogEx::AddFile 3 "" "$TEMP\output.log"
  15. LogEx::Write 'Write "dir" output from line3 to line6 to the log file'
  16. LogEx::AddFile 3 6 "" "$TEMP\output.log"
  17. LogEx::Close
  18. SectionEnd