Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Disable page components with IfFileExists (http://forums.winamp.com/showthread.php?t=284317)

Makedon 3rd January 2008 17:56

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 17:59

The FAQ has your answer:

http://nsis.sourceforge.net/Skipping_Pages

Afrow UK 3rd January 2008 18:01

If you don't want to skip the page (maybe a better idea...)
code:

!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 18:18

Thank you kichik and Afrow UK for quick response ,i will try that soon as i get home.


All times are GMT. The time now is 04:30.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.