Of course, you don't have regYYY.exe on your Windows, but you'll get "Return value: 0" , which means execution success [:-(]. However, a second run of the very installer on the same machine will give the result "Return value: error".
Name "nsExec Test"
OutFile "nsExec-Test.exe"
ShowInstDetails show
Section "Silent MakeNSIS"
nsExec::Exec "regYYY"
Pop $0 # return value/error/timeout
DetailPrint ""
DetailPrint " Return value: $0"
DetailPrint ""
SectionEnd
You can easily reproduce this symptom by installing a virtual machine software with snapshot functionality, e.g. WMWare Workstation(you are well off making a snapshot before first launching the installer).
Does any developer guy know what the problem is? I'm using NSIS v2.31 .