My Problem:
I have a deferred custom action that runs code based on the install state of a feature. For example:
Code: Select all
If (FeatureA is installed)
Run this code
elseif (FeatureA is installed AND FeatureB is NOT installed)
Run this code
etc.
So, I guess my question is, how can I access the install states of features (in a deferred custom action) in a silent install? Since the "ADDLOCAL" method works in full-ui installations, I was hoping to use "ADDLOCAL" in silent installs also. But, it looks like I may have to change my implementation. The idea I have:
- Some way to populate "ADDLOCAL" during a silent install. Maybe I need an immediate custom action (so I can access the feature install states directly) that looks at the install state of each feature. If InstallState.Local=true, add that feature to "ADDLOCAL". Since the "ADDLOCAL" doesn't behave the way I expected in a silent install, I'm nervous about what ramifications this might have on the rest of the installation. I have to think about upgrades and patches also.
A couple things to keep in mind
- I use feature conditions to disable features. For example, I set the "Disabled if" field of "FeatureB" to B_LICENSED=0.
- I don't want to require ADDLOCAL=<Features> be passed in the command line.
Also, if anyone could explain (or point me to an article) what defining "ADDLOCAL" in the command line really does. I understand that it's a list of features that will be installed, but it seems to put the installer in some kind of special mode. The installation skips straight to the "ResumeDlg" and feature conditions are overridden. I'm not really understanding the relationship between the ADDLOCAL property and silent vs full-ui installations.
Any advice would be greatly appreciated.
FOLLOW US
Get the latest news in Application Packaging