Create multiple features packaage
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
Answers (3)
Please log in to answer
Posted by:
rad33k
9 years ago
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
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
Posted by:
Badger
9 years ago