Capture exit code of MUI_UNPAGE uninstaller if rebooting
Hi,
I'm calling an uninstaller from an installer to uninstall the old version of a program before installing a new version. The way I am doing that is as follows:
ExecWait '"$2" _?=$INSTDIR' $0
${If} $0 != 0 ;Abort if we need to restart before continuing with install, or didn't exit the uninstaller gracefully
Abort
${EndIf}
The problem is that I don't know how to set the return value for the uninstaller properly. I'm just using the MUI_UNPAGE macros, and a /REBOOTOK flag when I'm deleting files. When the file isn't deleted, I assume that the reboot flag gets tripped, which then prompts the user to reboot.
How can I get the option that they chose so I know whether or not to abort the current install? I was almost going to forcibly "Abort" on the uninstall so that the return code would not be 0 (since I can't set my own return code), but I don't know where to do that.
Thanks!