Archive: Print the contents of a MessageBox


Print the contents of a MessageBox
Hello all. I wrote a little NSIS script that reports if a user is up-to-date or not, and at the end reports what updates they are missing. I would like to print the MessageBox or at least the contents of the MessageBox. Is there a way to do this? I would be alright with sending the contents of the MessageBox into a txt file, and printing that txt file, but not sure how to do that. Any help would be much appreciated, thanks.


This should help you:
http://www.agg.dkrz.de/people/Patzig/fprt/fprthlp.htm

-Stu


Ok, you don't really need that. I found this also, which doesn't require a seperate executable (just plain DOS command):
http://www.melbpc.org.au/pcupdate/2208/2208article4.htm

-Stu


If you create a text file with the text, this should also work:

ExecShell print "C:\path\to\file.txt"
It might not work if the user has changed the default association for text files.

Thanks guys, I’ll try them out.

Question though, what would be the best way to send text to a txt file from the nsis script? I would like to append, so I can add multiple lines, making a list. Thanks.


Jnuw, look up FileOpen (in append mode), FileSeek (to get to the end of the file before you write), FileWrite and FileClose in the docs, those are the four commands you need.


RobGrant - Excellent, thanks!