cybereka
14th March 2003 11:10 UTC
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.
Joost Verburg
14th March 2003 11:16 UTC
Use:
ExecWait "app.exe" $R0
$R0 contains return code
cybereka
14th March 2003 11:37 UTC
But ExecWait will popup command window. That should not happen here. So is there anyother way to get it using nsExec's
Joost Verburg
14th March 2003 13:57 UTC
nsExec returns it to the stack.
nsExec::ExecToLog "app.exe"
Pop $R0
$R0 contains return value
Afrow UK
15th March 2003 01:47 UTC
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
cybereka
15th March 2003 05:35 UTC
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
kichik
15th March 2003 12:22 UTC
Have a look at the InstallOptions code to get understand how to take control over the NSIS installer.