Skip to content
⌘ NSIS Forum Archive

Disable page components with IfFileExists

4 posts

Makedon#

Disable page components with IfFileExists

Hi all and Happy New Year

The question is this.

Im making a community game mod installer ,and file xyz.txt is not found in InstallDir i like to disable/hide components page and if file xyz.txt is found i like components page to be shown.

If that is not possible ,how can i disable user to select some option components depending if that file is found or not?


Thanks in advance ,and sorry for mine bad english 🙂
Afrow UK#
If you don't want to skip the page (maybe a better idea...)

!include LogicLib.nsh
!include Sections.nsh

Section "My Section" MySection1
SectionEnd

...
${Unless} ${FileExists} $INSTDIR\xyz.txt
SectionSetFlags ${MySection1} ${SF_RO}
...
${EndUnless}
Stu