cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Romain06
Level 3

Disable a feature with installscript

Hi,
I am not able to disable a feature. I searched for one day but I have no idea
The code I use is
FeatureSelectItem(MEDIA, "F", FALSE);
FeatureSetData(MEDIA, "F", FEATURE_FIELD_VISIBLE, FALSE, "");

I have an error -132, but I have no description with FormatMessage.

I have made a custum action that launch a installscript function when I click on a button to validate a serial number.

Any idea ?

Thank you for your help

Romain
Labels (1)
0 Kudos
(3) Replies
Romain06
Level 3

I think the problem is that I have a basic msi project

but is there a solution to use this function ?

Thanks
0 Kudos
Cary_R
Level 11

Try MsiSetFeatureState:

http://msdn.microsoft.com/en-us/library/windows/desktop/aa370387(v=VS.85).aspx

Although, it's worth noting that MSI ControlEvents triggered from dialog controls are a lot easier to use. Specifically the AddLocal and Remove control events published from PushButtons are something you'll see if a lot of MSI packages out there.
0 Kudos
Romain06
Level 3

Thank you !!!

It works 🙂

bye

Romain
0 Kudos