Archive: Reporting status to the installer from C code


Reporting status to the installer from C code
Hai all,
I am calling a exe from my installation script and what i need is a way to inform the script about the success or failure of the execution file. How can i do this? I tried returning -1,0,1 but it reacts simillar for all the values. Can any one help me please. Thanks a lot.


Use:

ExecWait "app.exe" $R0

$R0 contains return code


But ExecWait will popup command window. That should not happen here. So is there anyother way to get it using nsExec's


nsExec returns it to the stack.

nsExec::ExecToLog "app.exe"
Pop $R0

$R0 contains return value


nsExec::ExecToLog "app.exe"
Pop $R0

If $R0 is "" then it was a success.


You could do...

StrCmp $R0 "" 0 Skip #checks if execution was success or failure

---Stuff here---

Skip: #skips stuff to do


-Stuart


Thanks Guys. I got it working. Then i need to implement a Licensing module in my c++ code can anybody guid me to get good stuff on that. Thanks in advance


Have a look at the InstallOptions code to get understand how to take control over the NSIS installer.