Hi Guys,

I have challenge to create a package which includes around 150 files which needs to be installed depending on the Hostname of the machine.

For eg.

If the Hostname contains BNK then, only files from the BNK folder should be installed (Files of BNK folder are included in the msi)
If the Hostname contains SPT then, only files from the SPT folder should be installed (Files of SPT folder are included in the msi)

Currently i am doing this through a powershell script which look for the hostname letters and copies the appropriate files from the folder but now my client wants to add the same logic with MSI file. Can you please let me know how can i achieve this logic from a msi.

Can we create separate features for each group and add a condition to the feature ? if yes , how to implement this? 

Or any other way to achieve this?

Regards,
Gary

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

1
Hi,
one of the approaches is to use Condition table to make a feature selection.

In your case it may look as follows:
- create VBS imediate CA to read %COMPUTERNAME% environment variable, find in string (InStr VBS function) BNK or SPT and then set appropriate property (eg. Session.Property("BNK")=1 if BNK is part of the computer name)
- set INSTALLEVEL property to 3 in Property table
- set Level to 100 in Feature table for both features - to disable installation of both of them
- set appropriate conditions in Condition table (eg. [Feature] <BNK_FeatureName>, [Level] 1,[Condition] <Property modified in CA eg. "BNK=1">) - this is to enable installation of selected feature
- fingers crossed ... :)

Please note that there are some limitations as described in 'Remarks' here:
https://msdn.microsoft.com/en-us/library/aa368014%28v=vs.85%29.aspx

Answered 04/16/2015 by: rad33k
Orange Senior Belt

Please log in to comment

Answers

0

I agree with the above.

I was going to suggest a conditionalised component, but you would still need a script to read the compName then set a Property to set the condition.

If you have a lot of files in separate components, go with the Condition table, to turn a feature on or off.

Answered 04/17/2015 by: Badger
Red Belt

Please log in to comment
0
Many Thanks....i will definitely try this approach and will update you
Answered 04/18/2015 by: Gary
Blue Belt

Please log in to comment
Answer this question or Comment on this question for clarity