Archive: how to combine installer and upgrader together?


how to combine installer and upgrader together?
hi guys,

I have a installer that is using MUI. Now the next version has rolled out and I need to write a installer that can also be a upgrader for those already installed the previous version.

The problem I am having is that I cannot skip MUI pages, I tried to put qualifier like IfFileExists in between MUI pages but it is not working. Is there a way to do it?

Thanks,


Put the qualifier ("IfFileExists" or some other if-then-else test) in the page's pre function. Then call "Abort" if you don't want that page to be shown.


Thank you for quick answer!

I did a little more research, and found this page
forums.winamp.com/showthread.php?s=&threadid=255533&highlight=how+to+disable+mui+page+pre

Basicly these are the same thing.

To overwrite the pre function of the mui page, you need to define MUI_PAGE_CUSTOMFUNCTION_PRE to your function.

here is an example to overwirte mui_directory page:


Function ddd
StrCpy $R0 "hi"
IfFileExists "c:\downloadq" download
StrCpy $R0 "ddd"
Abort
FunctionEnd

!insertmacro MUI_PAGE_LICENSE "hihi.txt"
!define MUI_PAGE_CUSTOMFUNCTION_PRE ddd

!insertmacro MUI_PAGE_DIRECTORY