![]() |
#1 |
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! |
![]() |
![]() |
![]() |
#2 |
Member
Join Date: Sep 2007
Posts: 63
|
If I use way(1),the caption of MessageBox is "Application uninstall".
|
![]() |
![]() |
![]() |
#3 |
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 |
![]() |
![]() |
![]() |
#4 |
M.I.A.
[NSIS Dev, Mod] 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 |
![]() |
![]() |
![]() |
#5 |
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. |
![]() |
![]() |
![]() |
#6 |
Senior Member
Join Date: Feb 2007
Location: Rijeka, Croatia
Posts: 225
|
This is still an issue. [Uninstall]Caption $Var renders captionless msgboxes.
PostEnd: |
![]() |
![]() |
![]() |
#7 |
Moderator
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 |
![]() |
![]() |
![]() |
#8 |
Senior Member
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: |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|