/usr/share/doc/nsis/Examples/nsExec/test.nsi is in nsis-doc 2.46-7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | Name "nsExec Test"
OutFile "nsExec Test.exe"
ShowInstDetails show
Section "Silent MakeNSIS"
nsExec::Exec '"${NSISDIR}\makensis.exe"'
Pop $0 # return value/error/timeout
DetailPrint ""
DetailPrint " Return value: $0"
DetailPrint ""
SectionEnd
Section "MakeNSIS commands help"
nsExec::ExecToLog '"${NSISDIR}\makensis.exe" /CMDHELP'
Pop $0 # return value/error/timeout
DetailPrint ""
DetailPrint " Return value: $0"
DetailPrint ""
SectionEnd
Section "Output to variable"
nsExec::ExecToStack '"${NSISDIR}\makensis.exe" /VERSION'
Pop $0 # return value/error/timeout
Pop $1 # printed text, up to ${NSIS_MAX_STRLEN}
DetailPrint '"${NSISDIR}\makensis.exe" /VERSION printed: $1'
DetailPrint ""
DetailPrint " Return value: $0"
DetailPrint ""
SectionEnd
|