Archive: Trying to build a conditional application launcher...now I'm stuck and need help


Trying to build a conditional application launcher...now I'm stuck and need help
Well I've never used NSIS before and know next to nothing about scripting. I've been at this for 3 days straight and I'm stuck and confused.

This is what I've come up with so far. (see attached)

I'm using the InstallOptionEx plugin (see attachment), I renamed it to InstallOptions and overwrote the one that came with NSIS.

In the end I'll replace the MessageBoxes with ExecWait to launch the application with the proper arguments, but I put the MessageBoxes while testing.

I think the problem is pretty obvious when you open the script, compile and run it...

(somebody help...please??)


You must insert at least one page macro for the MUI to work its magic on the UI. You'll probably want to use MUI_PAGE_INSTFILES anyway.


could you maybe give a little example of how you mean, I've tried that and it didn't help much, just gave me an page I didn't want.

The main thing that's giving me trouble is that it's supposed to skip certain functions depending on the operating system it's running on, the custom pages seem to work fine but it still runs all the messageboxes regardless of whether the page was skipped or not.

An obvious example of this is when you compile and run the script on WindowsXP: It shows the intro page fine, but when you click next it shows the "Single User" dialog even before the next page comes up with the install button. Also the "Single User" dialog is only supposed to come up in Windows 98-ME with the Win98ME page, in fact all the messageboxes pop up when only some are supposed to.


Ok well I got it working (almost) without having to use any page macro (I only use custom pages).
The problem now is that the cancel button doesn't work properly. When you click cancel it shows the "are you sure you want to quit" dialog but then when you click yes it still runs through the commands.

I hope that someone is able to help me fix it and that it's it's not too difficult.

:(


For an example of MUI_PAGE_INSTFILES usage see any of the MUI examples in Examples\Modern UI.

As for the cancel button, if you want to know if the user clicked cancel after MUI_INSTALLOPTIONS_DISPLAY returns, you should use MUI_INSTALLOPTIONS_DISPLAY_RETURN and pop the return value. The return value will contain "cancel" if the user clicked the cancel button.


Thanks, got it working. :)