return value from the installer exe
Hi All,
I have a updater exe written in NSIS. I call this from a VC application using create process.
My design was updater.exe will return a value depending on success or failure or some other condition.
So i tried in .onInstSuccess and .onInstFailed pushing a value to stack and i was thinking this will be a return value of the executable. So i had my VC caller doing a check by
GetExitCodeProcess(pi.hProcess,&dwExitCode)
But i observed that i get exitcode as 0 always or 2 when i call abort in code.
I tried doing
System::Call 'kernel32::ExitProcess(i 5)' to return 5 and close the updater. But doing this crashes the updater as it is being considered as abnormal termination.
So someone advice me, how i can implement my design.
thanks
gP