Tim

Creating dependencies

Hi ,
how to create dependencies between 2 features . Then if suppose i have Two versions say for example Test 1 And Test 2 of a product on a same setup and i want to set a condition such that the user can install only one version at a time say Test 1 and then the user can go on for next version Test 2 only after installing the Test 1 or vice versa . That is the user shudn't be able to install two versions at a time .
can anyone give me a solution for this .
Thanking You ,
Tim
Guest

hey!!!
any body please reply me . This is quiet important for me please let me know what could be done for dependencies ?
Hope somebody reply me soon!!!!!!!!!!!!!
Thanking you in Advance
Tim
Guest

hey ,
I'm still waiting for your reply . Please do reply me !!!!!!!!!!!!!
Thanking you,
TIM
ciprian
Posts: 259
Joined: Thu Jul 14, 2005 12:56 pm
Location: Craiova, Romania
Contact: Website

Hi Tim,

It is not recommended to include both versions of the same product in the same package. You could create two separate packages each one containing one version of the product.

If you want to include both versions of the product in the same install package, here is what you could do in order to condition the feature's installation:

- Create a property, in the "Install Parameters" page.

- Create two "Property Set With Formated" custom actions that will check if a feature is going to be installed and set the property to a certain value. The conditional statement syntax that checks if a feature is going to be installed is: "&Feature=3"

For more information on this topic please visit:
http://msdn.microsoft.com/library/defau ... syntax.asp

- Condition the installation of the the features depending on the value of the property.


Regards,
Ciprian
Ciprian Burca
Advanced Installer Team
http://www.advancedinstaller.com
Guest

Hi Ciprian,
I understood that i will have to create a property in install parameter page but i dint undertsand what shud be its name , Basically can you please let me know the step by step procedure . It will be of great help to me.
Then how to set the dependency between two features ? Please give me instructions for this also .
Thanking you ,
Tim
Guest

Please Ciprian Reply me !!!
ciprian
Posts: 259
Joined: Thu Jul 14, 2005 12:56 pm
Location: Craiova, Romania
Contact: Website

Hi Tim,


I'm sorry but I misunderstood your request. The solution I gave you earlier will not work in your case.
There is another possibility but in evolves setting the value for those properties from command line using "msiexec.exe".

In order to condition the installation of the features here is what you could do:

- Go to the "Install Parameters" page and create a property named say, "InstallFeature", set it's value to 0 for example.
- Go to the "Organization" page.
- Click on the "MainFeature" branch.
- In the "Feature Properties" pane click on the [ Conditional... ] button.
- In the newly appeared window use the [ New ] button to edit the "Condition" field to "ok=2" and set the "Level" field to "0(Disabled)"

Repeat the above steps for the second feature only this time set the values for the "Conditional" field to "ok=1". Set the "Level" 0.

The command line to launch your application and set the value of the property is:

msiexec /i "Package.msi" Property=value;

For example if you want to install the first feature your command line should look like this:

msiexec /i "MyPackage.msi" ok="1";

For more information on this topic please visit:
http://msdn.microsoft.com/library/defau ... ptions.asp

All the best,
Ciprian
Ciprian Burca
Advanced Installer Team
http://www.advancedinstaller.com
Tim

Hi Ciprian ,
Thanx for your solution ,If you wudn't have been there then i wud have struggled a lot . i will try and let you know whether its working and Can you please let me know one more thing how do you set dependency between the features. Please let me know that also .

I wanna install two things say for example A and B it is that A will not work properly without B getting installed but these two are different products that is i cant put them under the same Feature so please tell me that procedure also .

Then i do have one more Question, How do you make a feature disable that is usually in certain install the options wud be greyed indigating that it cannot be installed or selected, bcoz i tried Install level 4 but during installation i was able to change the cross and make it enabled .Disable wil not solve my purpose since i want the feature to be present but disable so please let me know that also.
Thank You Very Much for your Time . Hope you will reply my other questions also .
Thanking You,
Tim .
Tim

Hey Ciprian ,
I' ll be waiting for Your solution ,Since there aren't good books on this product in detail ,i'm Sorry we are forced to disturb you guys.
Please give me the solution .
Thanking You ,
TIM
Guest

Hey Ciprian,
I tried what you asked me to but still i dont get that option which installs the Version1 first and then allows the user to go on for Version2. Please any of you who can guide me through in this let me know . Its quiet urgent
Please reply me soon. Atleast you please let me know whether its possible .So that i can go ahead further .Hope you wil reply me soon .
Thanking You ,
Tim
Guest

Please can anybody reply me?
ciprian
Posts: 259
Joined: Thu Jul 14, 2005 12:56 pm
Location: Craiova, Romania
Contact: Website

Hi Tim,

You cannot install one feature and then allow the user to go on and install the other feature.

You could try this instead. Create two install packages. One will contain the files that are currently in feature A and the other the files that are in feature B. You can set one package to be installed as a prerequisite for the other.

More on prerequisites you can find at this location:
http://www.advancedinstaller.com/user-g ... sites.html

As for your second question, it is not possible to set a feature to appear "grayed". If you don't want the user to have access to a certain feature you must set the install level to "0 (Disabled)". If you set the install level to other values, the user can install that feature.

For more documentation on this topic please visit:

http://msdn.microsoft.com/library/defau ... _table.asp

Regards,
Ciprian
Ciprian Burca
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Feature Requests”