- NSIS Discussion
- How to display a README after the license page, before anything else?
Archive: How to display a README after the license page, before anything else?
vbgunz
5th July 2003 12:20 UTC
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 :)
kichik
5th July 2003 12:46 UTC
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.
Vytautas
5th July 2003 13:30 UTC
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
vbgunz
5th July 2003 13:37 UTC
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 :)
Vytautas
5th July 2003 13:52 UTC
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
vbgunz
5th July 2003 14:06 UTC
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 :)
Vytautas
5th July 2003 14:10 UTC
Sorry about the quotes, I was not sure if they were needed or not.
Vytautas
Afrow UK
5th July 2003 14:16 UTC
Strange.
That shouldn't corrupt the installer...
Never does that for me anyway.
What NSIS version are you using?
Latest CVS?
-Stu
vbgunz
5th July 2003 14:21 UTC
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?
Afrow UK
5th July 2003 14:34 UTC
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
kichik
5th July 2003 15:35 UTC
Then your scripts are not written right Afrow. The correct syntax is:
File "/oname=File name with spaces.txt" File.txt
Afrow UK
5th July 2003 15:45 UTC
Thanks :)
Luckily, I found only 1 place where I had used the incorrect syntax.
-Stu