Archive: UninstallCaption problem


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!


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


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


Please submit a bug report for this. It should be possible to modify the caption on runtime, just like any other string.


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.