Archive: Clickable link in a message box


Clickable link in a message box
How do I display a clickable link in a message box? If that's not possible, how can I send the user to a link by pressing a button?

I want to send my users to Microsoft's site if the don't have the .net framework installed. Right now, I just display a huge link if .net is not present, but they cannot click on it.


You should create a custom page and then you can add a link to the site on that page and if they have .Net installed you can skip that page.

Vytautas ;)


you could always use a messagebox as normal and based on the return value from it then open the link as needed. have a look in the archive here which may be more to your needs (you can alter the button text, etc)

-daz


Calling a link
Thanks you guys for your help with this! I think I would like to call a link based on a return value from the message box.

I am a total NSIS lightweight though - I do not see examples of how to call or follow a link anywhere. Can you show me a script that does this?


MessageBox MB_YES|NO "Open ${MUI_PRODUCT} website?" IDNO +2
ExecShell open "http://www.mywebsite.com/"

-Stu


Tnx Stu! Just put your MB code in my installer - this should make my software's .net requirement much less of an issue.


Sorry I made a slight typo there...

Should be:

MessageBox MB_YESNO|MB_ICONQUESTION "Open ${MUI_PRODUCT} website?" IDNO +2

NSIS doesn't use anymore MUI_PRODUCT to define a product name, instead, it uses $(^Name) language string. So:

MessageBox MB_YESNO|MB_ICONQUESTION "Open $(^Name) website?" IDNO +2

The message box was the easy part - calling a link was the part that I could not figure out. Is ExecShell open in the documentation, or do I just have a bad case of ADD?!


ExecShell is part of the Documentation as you can see here

ExecShell

The problem using this command is to know what possiblities you have on certain file extensions. You have to check it at the File Association Tab in the Option of the Windows Explorer. But in most cases "open" will work


hmmm, a clickable link seems to be a recurring option for a messagebox. very tempted to add this to my messagebox plugin (was going to fix it's issues soon anyway)

-daz