PDA

View Full Version : Changing "Key Name" of a new feature else MsiSetFeatureState won't work.



johnd2
07-29-2004, 08:01 AM
Hello all,

Been scratching my head for a few hours because all my calls to MsiSetFeatureState in my custom actions all returned ERROR_UNKNOWN_FEATURE. I'd added a new feature called "Help Files" and I'd used that (quite sensibly I thought) as the szFeature argument to MsiSetFeatureState.

Didn't work - got very frustrated - seached this group - found nothing helpful except a mention of orca. Turns out I've got that.

Thanks to Orca I saw that the name of the feature was actually New_Feature7 and the Title was "Help Files".

Back to ISX and I can see (after a bit of rooting around) that the "Key Name" property of the new feature is also listed as "New_Feature7" - not very convenient.

So - can I change the "Key Name" of a new feature? (if not, why not?).

Thanks in advance,

john.

Mike Marino
07-29-2004, 04:51 PM
Not in the Express IDE. We assign the feature key names as we create them.

Our Professional tier products offer this functionality.

In fact in Express we use to hide the key names altogether, until we noticed that writing certain types of custom actions could not be written without this information.

You can change the Key name in Orca, but make sure you change all places that use that key (otherwise the database will loose integrity). Usually this means the Feature and FeatureComponents table. But I would do a search.

In general, Express tries to hide all keys from our users. We expose this level of complexity in our higher tier products.

Hope this helps.

johnd2
07-30-2004, 02:52 AM
Originally posted by Mike Marino
Not in the Express IDE. We assign the feature key names as we create them.

Our Professional tier products offer this functionality.

In fact in Express we use to hide the key names altogether, until we noticed that writing certain types of custom actions could not be written without this information.

You can change the Key name in Orca, but make sure you change all places that use that key (otherwise the database will loose integrity). Usually this means the Feature and FeatureComponents table. But I would do a search.

In general, Express tries to hide all keys from our users. We expose this level of complexity in our higher tier products.

Hope this helps.

Indeed it does help Mike, Thank you.