Hello,
I'm using AI 4.3 enterprise, registered.
I am attempting to decompose my installation project into features. Certain features will always be installed, other features may or may not be installed. The features that may or may not be installed are dependent upon certain target machine conditions. For example, I have a feature named TSFeature. If the target machine has Terminal Services present as part of the operating system, then my AI project needs to install the TSFeature feature that I have created. Users will not necessarily be able to choose features with a UI, instead I want to programmatically choose which features do and do not get installed / uninstalled.
One way I think I can do this is by using user defined properties. If I establish a user defined property called MY_PROPERTY_TS, and set it to "TRUE" with a custom action, then I can configure my TSFeature feature with a conditional of MY_PROPERTY_TS = "TRUE".
Currently I have my TSFeature feature configured with an Install Level of 0. I then have a conditional set on this feature with a conditional of MY_PROPERTY_TS = "TRUE" and a Level of 1. My thinking here is that I can programmatically control the value of MY_PROPERTY_TS by setting it to "TRUE" or "FALSE" with a custom action (probably in a C++ DLL in the future, but for now I am prototyping and simply testing with some VBScript because it is easy to get and set user defined properties very easily with VBScript inline or in a .VBS file). Then, as I programmatically control the value of MY_PROPERTY_TS, this will determine whether or not the TSFeature feature gets deployed by AI/WI.
Some questions:
(1.) Is this a reasonable approach?
(2.) Am I understanding features correctly and using them appropriately?
(3.) When can I set MY_PROPERTY_TS (a user defined property) within a custom action? What is the earliest point at which a user defined property can be set? Can I set a user defined property in InstallExecuteSequence\Begin (this appears to be one of the earliest custom action integration points)?
(4.) I've tested this approach and it feels like a solid approach, but I do hit some challenges when performing install/uninstall when UI/silent items are mixed. For example, if my custom action is set within InstallUISequence, then MY_PROPERTY_TS does not get set by my custom action sometimes because a silent install is taking place and thus the InstallUISequence portion does not execute.
(5.) I'm anticipating that I can easily move from VBScript regarding getting and setting user defined properties such as MY_PROPERTY_TS using code like Session.Property("MY_PROPERTY_TS") = "TRUE" to a C++ DLL using functions like MsiGetProperty and MsiSetProperty. Hopefully this will be an easy architectural transition for me when using AI. I am extremely deep in C++ so going to C++ will be no problem but integrating with AI and WI through MSI functions like MsiGetProperty and MsiSetProperty will be somewhat new to me.
Thank you very much for your time and comments.
FOLLOW US
Get the latest news in Application Packaging