Makedon
3rd January 2008 18:56 UTC
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 :)
kichik
3rd January 2008 18:59 UTC
The FAQ has your answer:
http://nsis.sourceforge.net/Skipping_Pages
Afrow UK
3rd January 2008 19:01 UTC
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
Makedon
3rd January 2008 19:18 UTC
Thank you kichik and Afrow UK for quick response ,i will try that soon as i get home.