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

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

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

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

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, 08:30   #2
fabian.rap.more
Senior Member
 
Join Date: Dec 2007
Posts: 111
Send a message via Yahoo to fabian.rap.more
When you change the value of $myCaption in the function it does not change the value in the caption as the function is not ended yet. if you check in a section aftes the initalisation of the uninstaller you can see that the caption has changed
fabian.rap.more is offline   Reply With Quote
Old 2nd January 2008, 08:32   #3
fabian.rap.more
Senior Member
 
Join Date: Dec 2007
Posts: 111
Send a message via Yahoo to fabian.rap.more
Function un.onInit
StrCpy $myCaption "Application unintaller"
MessageBox MB_ICONQUESTION|MB_YESNO "some words" IDYES +2
Abort
FunctionEnd

Caption "$myCaption" ;if on top then the uninstaller will crash

Section
MessageBox MB_ICONQUESTION|MB_YESNO "some words" IDYES +2
SectionEnd

Last edited by fabian.rap.more; 2nd January 2008 at 09:31.
fabian.rap.more is offline   Reply With Quote
Old 2nd January 2008, 10:18   #4
bholliger
Senior Member
 
Join Date: Jul 2004
Location: Switzerland
Posts: 223
Re: UninstallCaption problem

Hi there!


The caption is initialised at runtime. You have to set the caption by other means.

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, 10:24   #5
bholliger
Senior Member
 
Join Date: Jul 2004
Location: Switzerland
Posts: 223
Re: Re: UninstallCaption problem

Or, try using this plug-in:

http://nsis.sourceforge.net/MessageBox_plug-in

Cheers

Bruno
bholliger 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