PDA

View Full Version : Help Enabling/Disabling a Feature from InstallScript



HookEm
07-29-2002, 07:44 PM
Std Project - IS Dev 7.04

Is there anyway to enable/disable a feature in the MSI project from InstallScript without creating a custom action? I'm trying to use MsiSetFeatureState to set the state to INSTALLSTATE_LOCAL for a feature that is disabled by default but I keep getting a return code "1606" from MsiSetFeatureState. I need to programmatically enable/disable this feature. I'm calling the function from the OnAppSearch() event at the beginning of my setup.


Any help would be appreciated.

narendra
01-24-2005, 07:27 AM
Hi,

Enabling/Disabling a Feature in installscript can be done by calling a
function FeatureSelectItem.

You can use FeatureSelectItem to change selection status before displaying features in feature dialogs, and you can use it to change or override selections afterward, depending on your setup's requirements.

Regards,
Narendra Prasad Y
Naren_mails@yahoo.com