lovespy108
2nd January 2008 04:34 UTC
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
2nd January 2008 04:36 UTC
If I use way(1),the caption of MessageBox is "Application uninstall".
bholliger
2nd January 2008 10:14 UTC
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
kichik
2nd January 2008 18:42 UTC
Please submit a bug report for this. It should be possible to modify the caption on runtime, just like any other string.
lovespy108
3rd January 2008 00:46 UTC
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.