Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WiX custom license file: setup shows links with < >

I created a WiX 3.5 setup with a custom license file by putting this into the .wxs file:

<WixVariable Id="WixUILicenseRtf" Value="License.rtf" />

This works perfectly and the link is displayed when I run the created .msi file.
(I'm using the WixUI_InstallDir Dialog Set)

Now I want to put a hyperlink into the license file.
I just put the link into the file by opening it in WordPad and pasting http://mylink.com (WordPad turns it into a hyperlink automatically).

When I compile that in WiX, the license agreement dialog shows the link like this:

<http://mylink.com>

I noticed that this seems to relate to WordPad creating a hyperlink automatically (see above).
When I remove the http:// part from the link in the license file, WordPad doesn't recognize it as a link anymore and in the compiled .msi file, the < and > in the license agreement dialog go away.

Any ideas how I can get rid of the additional < and >, except putting the link into the license file without the http:// part?


EDIT:

Okay, maybe I didn't think enough when I used the word "hyperlink".
What I actually meant was: It does not have to be an actual clickable hyperlink.
I just want the adress of my web page to be displayed at the top of the license file.

I'm perfectly fine if it's just the URL as text (not clickable), but I want it to be displayed as I entered it, and not with < >.
The problem is that WordPad automatically turns any URL into a hyperlink as soon as I enter it, so I have no idea how to get the license agreement dialog to treat it as normal text.

like image 319
Christian Specht Avatar asked Oct 03 '11 10:10

Christian Specht


1 Answers

Windows Installer doesn't support hyperlinks in the scrollable text control. This is why the link is not displayed correctly. Even if it was, nothing would happen when you click it because Windows Installer doesn't handle this event.

A hyperlink in a scrollable text control works only if you use an external UI which handles it.

Edit:

If you just want to display some text as a link, the usual approach is make it blue and underlined. As you already noticed Windows Installer doesn't show conventional hyperlinks correctly.

If you want to show a link as normal text, simply open the RTF file with a normal text editor (for example notepad.exe) and remove the hyperlink markers. Just follow the normal text formatting and you will easily spot the markers you want to remove.

like image 138
rmrrm Avatar answered Sep 25 '22 23:09

rmrrm