51

I'm trying to specify the licence for my wix setup project.

I have created a rtf with a few dummy lines in wordpad/notepad/vs tried a few different ways as I read there was an issue with ones created in word but I dont think that should apply here, in any case I also opened it up in notepad++ and verified there is no funky characters hidden in it.

I am specifying the file like so

<WixVariable Id="WixUILicenseRtf" Value="$(var.ProjectDir)\Resources\test.rtf" />

And the file exists under the project\Resources directory.

When I run the installer all that is shown in the licence area is a blank text box with no scroll bars etc.

Is there something else I should be doing?

Yan Sklyarenko
  • 31,557
  • 24
  • 104
  • 139
Daniel Powell
  • 8,143
  • 11
  • 61
  • 108

4 Answers4

73

Save the license.rtf from WordPad. See this webpage (http://wixtoolset.org/documentation/manual/v3/wixui/wixui_customizations.html), specifically this section:

There is a known issue with the rich text control used to display the text of the license file that can cause the text to appear blank until the user scrolls down in the control. This is typically caused by complex RTF content (such as the RTF generated when saving an RTF file in Microsoft Word). If you run into this behavior in your setup UI, one of the following workarounds will fix it in most cases:

Open your RTF file in WordPad and save it from there in order to remove the complex RTF content from the file. After saving it, rebuild your MSI. Use a dialog set other than the WixUI_Minimal set. This problem typically only occurs when the license agreement screen is the first one displayed during setup, which only happens with the WixUI_Minimal dialog set.

Michael Kelley
  • 3,579
  • 4
  • 37
  • 41
  • 4
    quite strange even tho i created the original file using new text file and renaming it to rtf and then saving it with wordpad it didnt work, when I started off in wordpad then saved the document it did – Daniel Powell Jun 17 '11 at 03:31
  • 15
    I found an additional trick to make this work - just opening an existing complex RTF file with WordPad and saving it again didn't work. What I did that has consistently worked is to open it with Microsoft Word, Select all (CTRL-A), Copy (CTRL-C), and then in a WordPad window, Paste (CTRL-V). Then Save-As in WordPad. This creates the simplified RTF file that is usable by the RTF control. – Kevin Brock Mar 18 '14 at 17:13
  • Changing the dialog to something other than WixUI_Minimal, while it may solve this problem, is not always an acceptable work around. Luckily @KevinBrock's resave steps worked for me with WixUI_Minimal. – Terrabits Jul 05 '18 at 17:25
  • WixUI_customization link is broken. – user3613932 Jul 25 '18 at 23:38
  • Link is now fixed, @user3613932. – Michael Kelley Jul 26 '18 at 01:21
  • Appreciate it. Thanks. – user3613932 Jul 30 '18 at 19:31
10

Thanks to @Daniel Powell's decision

  1. Open WordPad
  2. Write your text
  3. Save by default(rtf)
  4. Rebuild your msi
  5. Profit.
Igor Semin
  • 2,486
  • 1
  • 20
  • 21
3

Open trf file in wordpad instead of md-word, It will solve the scroll issue

Amrik Singh
  • 503
  • 5
  • 4
-1
<WixVariable Id="WixUILicenseRtf" Value="test.rtf" />

and include your test.rtf in the Setup project.

Buzzy
  • 1,783
  • 18
  • 15