0

I'm very new to Null-soft scripting. We have existing script which I use to create installer. There I found the license page is showing email ID with extra < mailto:email id > text.

I'm trying to make the email ID clickable and hide < mailto:email id >.

Please refere the image below:

Reference Image

Aansari
  • 51
  • 4
  • Just to be clear, this is a RTF file? And it contains an email address that you don't want to be click able? – Anders Apr 30 '20 at 21:39
  • Its a RTF file. It contain email address. I want the email address to be clickable.But i do not want to show the actual link. I have added one image. Please have a look. – Aansari May 08 '20 at 16:44

1 Answers1

0

The license is displayed using the RichEdit control and it is adding that extra text because you probably have both a fldinst HYPERLINK and a fldrslt field in your RTF source. It is somewhat unclear to me what the exact syntax for a link is supposed to be in RTF.

If having "mailto:test@example.com" with the mailto prefix is acceptable then you can just insert that as plain text and let the automatic URL handler deal with it:

{\rtf1\ansi{\fonttbl\f0\fswiss Helvetica;}\f0\pard Hello mailto:test@example.com World}

If that is not acceptable then you must modify NSIS to use a different version of the RichEdit control.

If you are able to compile NSIS then you can change Source\exehead\resource.rc:

Change RichEdit20W and RichEdit20A to RichEdit50W

and if you are unable to do that you can use Resource Hacker and modify the stubs in NSIS\Stubs. Change Dialog 102's RichEdit20A/RichEdit20W to RichEdit50W.

Either way, you also need to add

Function .onInit
System::Call 'KERNEL32::LoadLibrary(t "msftedit")'
FunctionEnd

to your .NSI file.

If you do all these steps correctly then it will be using the newer RichEdit control that only exists on Windows XP and later and it should display the link correctly without the extra suffix.

Anders
  • 97,548
  • 12
  • 110
  • 164