test.nsi 782 B

12345678910111213141516171819202122232425262728293031
  1. Name "nsExec Test"
  2. OutFile "nsExec Test.exe"
  3. ShowInstDetails show
  4. Section "Silent MakeNSIS"
  5. nsExec::Exec '"${NSISDIR}\makensis.exe"'
  6. Pop $0 # return value/error/timeout
  7. DetailPrint ""
  8. DetailPrint " Return value: $0"
  9. DetailPrint ""
  10. SectionEnd
  11. Section "MakeNSIS commands help"
  12. nsExec::ExecToLog '"${NSISDIR}\makensis.exe" /CMDHELP'
  13. Pop $0 # return value/error/timeout
  14. DetailPrint ""
  15. DetailPrint " Return value: $0"
  16. DetailPrint ""
  17. SectionEnd
  18. Section "Output to variable"
  19. nsExec::ExecToStack '"${NSISDIR}\makensis.exe" /VERSION'
  20. Pop $0 # return value/error/timeout
  21. Pop $1 # printed text, up to ${NSIS_MAX_STRLEN}
  22. DetailPrint '"${NSISDIR}\makensis.exe" /VERSION printed: $1'
  23. DetailPrint ""
  24. DetailPrint " Return value: $0"
  25. DetailPrint ""
  26. SectionEnd