JoeAcunzo
20th February 2004 18:09 UTC
How to Conditionally Display Dialog
I've found sample code to detect the version of Internet Explorer, which I use in my .onInit. If it's less than 5, I want to display a dialog with a link to Microsoft's site to download IE and abort the install. I'm using InstallOptions for the dialog, but how do I conditionally display this dialog from .onInit? Is there a plugin I could use perhaps?
Note that I'm using the Modern UI (MUI) and know how to insert a custom page and tried this approach, making it the first page, instead of in .onInit. I tried not showing the page based on the version of IE which works, but the back button on the second page brings the user to it anyway, even if I didn't originally show it.
Thanks in advance,
Joe A.
Joost Verburg
20th February 2004 22:46 UTC
You can skip a page using Abort in the pre-function.
JoeAcunzo
21st February 2004 13:56 UTC
When I tried this approach and when the custom page is the second page (after the Welcome page), it all seems to work correctly. However, if I make my custom page the very first page, there is a problem. When it starts up, the first page is skipped as it should be due to the Abort and it goes right to the Welcome page. However, now on the Welcome page, I can click <Back and the install aborts completely (exe shuts down). Is that expected behavior?
eccles
21st February 2004 16:05 UTC
Yes, your custom page aborts, so the installer moves to the next (previous) page, of which there are none. The result is the installer closes.
If you can't live with your page not being the first page ;) then you should define a MUI_PAGE_CUSTOMFUNCTION_PRE function for the second page. In your function you can then set the InstallOptions BackEnabled setting in $PLUGINSDIR\ioSpecial.ini as appropriate.