Old 3rd January 2008, 17:56   #1
Makedon
Junior Member
 
Join Date: Jan 2008
Posts: 6
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
Makedon is offline   Reply With Quote
Old 3rd January 2008, 17:59   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
The FAQ has your answer:

http://nsis.sourceforge.net/Skipping_Pages

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 3rd January 2008, 18:01   #3
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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
Afrow UK is offline   Reply With Quote
Old 3rd January 2008, 18:18   #4
Makedon
Junior Member
 
Join Date: Jan 2008
Posts: 6
Thank you kichik and Afrow UK for quick response ,i will try that soon as i get home.
Makedon is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump