Archive: How to display a README after the license page, before anything else?


How to display a README after the license page, before anything else?
I need to display a readme file with instructions... Is this supported? I would like to display an rtf or html file. Is their a workaround if a readme file is not supported?

It has to show up after the license page but before anything else. Can someone please help me out with this? Thank you :)


This recent thread discusses creating two different directory pages. The same goes to license pages. Note that the license page created by the script will not be able to show RTF files unless you start adding a lot of System.dll commands.


Also if you wanted to display the Readme file outside the installer, e.g. in notepad, you could also use the ExecShell or ExecWait commands to display the required file.

Vytautas


Thank you Vytautas,

I much rather do it in this fashion; outside of the installer because it holds a bunch of instructions for several custom screens. Where should I place ExecShell or ExecWait in order for the instructions to open up after the license page?

Thank you in advance :)


First of all you will need to use this define line

!define MUI_CUSTOMFUNCTION_LICENSE_LEAVE LeaveLicense
after that you will need a function similar to this
Function LeaveLicense
File /oname="$TEMP\readme.txt" "readme.txt"
ExecShell "open" "$TEMP\readme.txt"
FunctionEnd
Note that you should not use ExecWait unless you want the user to close down the readme file before installer proceeds and also note that ExecShell will use the default program to open the file. It would also be a good idea to use the ReserveFile command on the readme file to make sure that it is placed at the start of the installer.

Vytautas

Thank you Vytautas,

Function LeaveLicense
File /oname=$TEMP\readme.txt readme.txt
ExecShell "open" "$TEMP\readme.txt"
FunctionEnd


Absolutely brilliant! Thank you so very much :) Your snippet on my 7/2 NSIS build would build fine but would corrupt on the actual run. I simply had to remove the quotes on /oname=...

This is perfect, thank you so much :)

Sorry about the quotes, I was not sure if they were needed or not.

Vytautas


Strange.
That shouldn't corrupt the installer...

Never does that for me anyway.
What NSIS version are you using?
Latest CVS?

-Stu


I am using the July 2nd Build. It would not corrupt the installer as I can go ahead with install but it would pop up a nasty message stating it cannot open the file (retry, ignore).

Still brilliant, maybe those NSIS guys changed something?


Originally posted by vbgunz
I am using the July 2nd Build. It would not corrupt the installer as I can go ahead with install but it would pop up a nasty message stating it cannot open the file (retry, ignore).

Still brilliant, maybe those NSIS guys changed something?
Looks like it...
I'm not going to use the latest CVS then; my scripts are riddled with /oname="blah"

-Stu

Then your scripts are not written right Afrow. The correct syntax is:

File "/oname=File name with spaces.txt" File.txt


Thanks :)
Luckily, I found only 1 place where I had used the incorrect syntax.

-Stu