- NSIS Discussion
- Clickable link in a message box
Archive: Clickable link in a message box
spewge
23rd October 2003 04:39 UTC
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.
Vytautas
23rd October 2003 06:43 UTC
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 ;)
DrO
23rd October 2003 13:03 UTC
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
spewge
25th October 2003 01:17 UTC
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?
Afrow UK
25th October 2003 11:50 UTC
MessageBox MB_YES|NO "Open ${MUI_PRODUCT} website?" IDNO +2
ExecShell open "http://www.mywebsite.com/"
-Stu
spewge
25th October 2003 22:08 UTC
Tnx Stu! Just put your MB code in my installer - this should make my software's .net requirement much less of an issue.
Afrow UK
27th October 2003 14:37 UTC
Sorry I made a slight typo there...
Should be:
MessageBox MB_YESNO|MB_ICONQUESTION "Open ${MUI_PRODUCT} website?" IDNO +2
deguix
27th October 2003 21:59 UTC
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
spewge
28th October 2003 06:42 UTC
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?!
flizebogen
28th October 2003 08:08 UTC
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
DrO
28th October 2003 14:04 UTC
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