Archive: some questions about a messagebox


some questions about a messagebox
hello everybody...
i've almost finished my .nsi :)




i've a few questions about the messageboxes...



1) how to go to a new line in the text of the messagebox ?
----> \r\n doesn't work


2) how to fix the size of the messagebox ?
----> I've three or four lines to write, and the width is too big... how to fix it ?


3) If the user hasn't the rights to install (if he's a guest on a pc), I display a messagebox with this code :


SetOutPath "$INSTDIR"
ClearErrors
File "K!TV\K!TV.exe"
IfErrors messagebox then

messagebox:
MessageBox MB_ICONEXCLAMATION "$(messagebox_no_rights)" IDOK abort
abort:
Quit


then:

but the windows error messagebox comes before my messagebox...
How to avoid this window error messagebox to appear ?


4) Does a command already exist in nsis, which sends an error messagebox if the users hasn't the rights to install the software ???














edit : thx for all your answers ;)

1) Did you try $\r$\n ?
2) You can't... just break into multiple lines.
3) Check your jump labels.
4) Check the web archive, there are some examples also a included plugin

:)


1) thx

2) thx !

3) I don't understand your answer...
my jump labels are good... it works, my messagebox appears but it's not fast enough to appear before the "error" messagebox of windows...

4) I'd rather not use plugins, because I won't be the guy who will use this script after...


5) another question :D is it possible to change the window name (like the command caption , but for the messagebox) ?


#5 - yes, sure my messagebox plugin in the archive does that

-daz


don't understand... where is the link ?


any ideas about the question 3) ?


how to hide the windows error messagebox ?


http://nsis.sourceforge.net/archive/...instances=0,32

ok thx I'm trying it ;)


just put the dll in your plugin folder. :)


thx


Originally posted by superwan
any ideas about the question 3) ?


how to hide the windows error messagebox ?
i think you'll have to try and use the system plugin for this (don't ask me for an example since i don't use it) and call the Windows API SetErrorMode(..) function. I think you can just use the SEM_NOOPENFILEERRORBOX value (i'm not near my dev machine so i can't check what the actual number value of it is) but that will prevent that message appearing i believe.

-daz

pfiou this isn't as easy as I thought :D

I'll have a look at it...

during this, could you help me again ? :D



6) I want my messagebox to have another icon than this of the installer...

I'm using this code :


messagebox::show MB_YESNO "$(question_hercules)" (K!TV\K!IR.exe,103) "$(messagebox_hercules)" IDYES IDNO

but this doesn't give me the icon of K!IR.exe
I don't know why...

any idea ?

DrO : I don't know which plugin you're talking about...

any address ?


up ;)


hello I'm back

I want to try to send a messagebox if I haven't enough rights to install my software


I can do this :


ClearErrors
File /nonfatal "K!TV\K!TV.exe"
IfErrors +1 then
messagebox::show MB_ICONEXCLAMATION|MB_ICONHAND|MB_TOPMOST|MB_SETFOREGROUND "" \
"0,103" \
"error you don't have rights enough" IDOK
Quit

(I try it in a windows guest section)

but this makes an error appear in windows ---> the windows messagebox is faster !





so, 2 possiblities

1. disabling the error message box of ms windows... hard, very hard

2. finding anywhere in windows that I don't have the rights ---> message box you don't have the rights

does anybody have any idea ???