Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7831389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T11:42:28+00:00 2026-06-02T11:42:28+00:00

So the question is this: I asked a question back here: How to allow

  • 0

So the question is this:
I asked a question back here: How to allow installation only to a specific folder?

How can I modify it a bit, so for example, I have 3 files to install, 2 of them are optional and should only be available to install, if a certain file/folder exists. I want to grey out the option to select them in the list, if the conditions are not met?

Thank you in advance.
Zsolt

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T11:42:30+00:00Added an answer on June 2, 2026 at 11:42 am

    I would try to do the following. It will access the component list items, disable and uncheck them by their index, what is the number starting from 0 taken from the order of the [Components] section. The items without fixed flag (like in this case) are by default enabled, thus you need to check if the condition has not been met instead. You may check also the commented version of this post:

    [Components]
    Name: Component1; Description: Component 1
    Name: Component2; Description: Component 2
    Name: Component3; Description: Component 3
    
    [code]
    procedure CurPageChanged(CurPageID: Integer);
    begin
      if CurPageID = wpSelectComponents then
        if not SomeCondition then
        begin
          WizardForm.ComponentsList.Checked[1] := False;
          WizardForm.ComponentsList.ItemEnabled[1] := False;
          WizardForm.ComponentsList.Checked[2] := False;
          WizardForm.ComponentsList.ItemEnabled[2] := False;
        end;
    end;
    

    The solution above has at least one weakness. The indexes might be shuffled from the original order from the [Components] section when you set the ComponentsList.Sorted to True. If you don’t
    use it, it might be enough to use the above code, if yes, then it’s more complicated.

    There is no simple way to get the component name (it is stored internally as TSetupComponentEntry object in the ItemObject of each item), only the description, so here is another way to do the same with the difference that the item indexes are being searched by their descriptions specified.

    procedure CurPageChanged(CurPageID: Integer);
    var
      Index: Integer;
    begin
      if CurPageID = wpSelectComponents then
        if not SomeCondition then
        begin
          Index := WizardForm.ComponentsList.Items.IndexOf('Component 2');
          if Index <> -1 then
          begin
            WizardForm.ComponentsList.Checked[Index] := False;
            WizardForm.ComponentsList.ItemEnabled[Index] := False;
          end;
          Index := WizardForm.ComponentsList.Items.IndexOf('Component 3');
          if Index <> -1 then
          begin
            WizardForm.ComponentsList.Checked[Index] := False;
            WizardForm.ComponentsList.ItemEnabled[Index] := False;
          end;
        end;
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have asked this question sometime back. But havent got a solution yet, Here
This is a link to a question I had asked two days back, How
I asked this question earlier. I am intrigued by std::set but I have another
I have asked this question before and the problem was half solved in the
I asked this question to multiple people and until now I do not have
I have asked this question on Telerik forums with no reply so I'm turing
This question ( .net Compact Framework 4.0 ) asked this back before the release
I asked this question before but with less information than I have now. What
I asked a similar question here a while back but all the answers were
Earlier, I asked this question: How can I perform a ping or traceroute using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.