lyz
19th January 2006 02:32 UTC
Conditionally remove components page
Hi there,
I want to hide components page conditionally. I've tried to following code, but it does not work:
!ifndef HIDE_COMP_PAGE
!insertmacro MUI_PAGE_COMPONENTS
!endif
...
Function .onInit
IfFileExists "foo.bar" AlreadyInstalled NotYetInstalled
AlreadyInstalled:
!define HIDE_COMP_PAGE "true"
NotYetInstalled:
FunctionEnd
I also tried to put the code in .onInit to .onGUIInit. But that did not for me either. Can anyone give me some help on this one?
Thanks
Takhir
19th January 2006 06:58 UTC
Components page skipping
This is how I did it for components page to be shown if dotnetfx.exe file presents in the $EXEDIR:
!define DOT_EXE dotnetfx.exe
!define MUI_PAGE_CUSTOMFUNCTION_PRE compPre
Function compPre
IfFileExists "$EXEDIR\${DOT_EXE}" showComp
Abort ; skip components page
showComp:
FunctionEnd
lyz
19th January 2006 18:15 UTC
Thanks Takhir!
I also figured out how to do it after I posted the question. And I did it exactly the same way as yours, and it worked like a charm! :D
Thanks.