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