Old 2nd January 2008, 04:34   #1
lovespy108
Member
 
Join Date: Sep 2007
Posts: 63
UninstallCaption problem

Var myCaption
(1)UninstallCaption "Application uninstall"
(2)UninstallCaption "$myCaption"

Function un.onInit
StrCpy $myCaption "Application uninstall"
MessageBox MB_ICONQUESTION|MB_YESNO "some words" IDYES +2
Abort
....
FunctionEnd

If I use way(1),the caption of MessageBox is "Application uninstaller".

but if I use way(2),MessageBox has no caption.

What's the reason?

Thanks very much!
lovespy108 is offline   Reply With Quote
Old 2nd January 2008, 04:36   #2
lovespy108
Member
 
Join Date: Sep 2007
Posts: 63
If I use way(1),the caption of MessageBox is "Application uninstall".
lovespy108 is offline   Reply With Quote
Old 2nd January 2008, 10:14   #3
bholliger
Senior Member
 
Join Date: Jul 2004
Location: Switzerland
Posts: 223
Re: UninstallCaption problem

Hi there!

The caption is initialised at runtime. It's not enough to change the variable.

Have a look at this wiki article:

http://nsis.sourceforge.net/Change_c...ler_at_runtime

Cheers

Bruno
bholliger is offline   Reply With Quote
Old 2nd January 2008, 18:42   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Please submit a bug report for this. It should be possible to modify the caption on runtime, just like any other string.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 3rd January 2008, 00:46   #5
lovespy108
Member
 
Join Date: Sep 2007
Posts: 63
The help documentation show:
4.8.1.41 UninstallCaption
caption
Sets what the titlebars of the uninstaller will display. By default, it is 'Name Uninstall', where Name is specified with the Name command. You can, however, override it with 'MyApp uninstaller' or whatever. If you specify an empty string (""), the default will be used (you can however specify " " to achieve a blank string).
*******************************************************
Accepts variables. If variables are used, they must be initialized in un.onInit.
********************************************************
So I initialize it in un.onInit.But failed.
lovespy108 is offline   Reply With Quote
Old 18th February 2015, 22:26   #6
aerDNA
Senior Member
 
aerDNA's Avatar
 
Join Date: Feb 2007
Location: Rijeka, Croatia
Posts: 225
This is still an issue. [Uninstall]Caption $Var renders captionless msgboxes.

PostEnd:
aerDNA is offline   Reply With Quote
Old 19th February 2015, 08:11   #7
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
If your message box is in .onInit or un.onInit then yes, it will not have a caption. Your message boxes need to be shown after.

Stu
Afrow UK is offline   Reply With Quote
Old 19th February 2015, 11:43   #8
aerDNA
Senior Member
 
aerDNA's Avatar
 
Join Date: Feb 2007
Location: Rijeka, Croatia
Posts: 225
I guess this has to do with $(^Caption)/languages initialization. That's a bummer if you need to change the caption in .onInit but it's not exactly critical so I'll do without it.

PostEnd:
aerDNA is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump