Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Tree control on the custom setup dialog


9 replies to this topic

haroldxious

haroldxious
  • Full Members
  • 70 posts

Posted 10 May 2007 - 12:19

why is it that even though i selected none of the features to install it still continue the installation process?

how can i detect if there is no selected, for example..

if the user deselects all the items in the tree there must be a dialog box to popup saying that you must select at leaset 1 item..

is that possible? any suggestions on how to do that?

thank you in advance

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 10 May 2007 - 16:29

You could add an error dialog yourself. Or you could mark at least one features as required so that users can't de-select it.

BTW running the install with all features de-select is valid. It is equivalent to an uninstall.

haroldxious

haroldxious
  • Full Members
  • 70 posts

Posted 11 May 2007 - 01:58

how could i check if all the features are de selected?

And another question if its ok, also related to tree control..
In the tree control there are options like:
1. This feature will be installed on local hard drive
2. This feature and all subfeatures will be installed on local hard drive
3. This feature will be installed to run from the network
4. This feature and all sub features will be installed to run from the network
5. This feature will be installed when required
6. This feature will not be available

Is there any possibility that only Option number 1,2 and 6 will be available?
options 3,4 and 5 are not needed in my installer, i only need select and deselect

if it is possible can you suggest how?

thank you very much in advanced

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 16 May 2007 - 21:22

To find out which features are selected please see:
Conditional Statement Syntax (near the bottom of the article)

For your second question this article might help:
Custom Setup Options in Windows Installer

haroldxious

haroldxious
  • Full Members
  • 70 posts

Posted 17 May 2007 - 05:06

Thanks stefan for the link.

But for the deselection item, i know the Conditional Statement Syntax im already using it in checking if the feature is installed. but my point here is for example you have 30 features displayed in the selection tree, then you deselect it all, i want that after i click the next button if all the features are deselected a mesage box will appear.

i have thought of calling a CA for the messagebox if there is no selected feature with the condition of
ex.
Event: DoAction
Argument: NoSelectMessageBox(CA)
Condition:
(&feature1<>3)&&(&feature2<>3)&&(&feature3<>3)............(&feature15<>3)

is this correct? what if i do have so many features installed so it would be a long condition.

im thinking of using MsiGetFeatureState to check if the features are selected but it will also have a long nested if in the code..

is there any suggestions on how will i do this or would you suggest to stick to what im thinkin.

thank you very much, any commont will be grreatly appreciated


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 17 May 2007 - 15:49

Actually you would have to check:
&Feature1<>3 And Not (!Feature1=3 And &Feature1<>2)

Where (!Feature1=3 And &Feature1<>2) means: Feature is already installed, and stays installed.

Usually I have one root feature (with the same name as the product itself) and all features are below this one. Thus you would only have to chack the rot feature.

haroldxious

haroldxious
  • Full Members
  • 70 posts

Posted 18 May 2007 - 05:14

QUOTE (Stefan Krueger @ 2007-05-17 15:49)
Usually I have one root feature (with the same name as the product itself) and all features are below this one. Thus you would only have to chack the rot feature.

Hello stephan,

i also have a root feature, but unfortunately when i deselect all the features under the root feature, the root feature is still selected.
ex.
=View on selection tree=
RootFeature(still selected)
SubFeature1(deselected)
SubFeature2(deselected)
SubFeature3(deselected)

Do i still have a settings to set so that whenever my subfeatures are all deselected my root feature will be deselected also.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 18 May 2007 - 18:30

Does the root feature have components of its own, or just sub features?

haroldxious

haroldxious
  • Full Members
  • 70 posts

Posted 21 May 2007 - 01:51

it has a dummy component so that i can remove the other options writen here

Custom Setup Options in Windows Installer


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 22 May 2007 - 17:55

I see. You could try with condition 0 on this component to see if that helps.