View Full Version : SdFeatureDialog2 problems

06-12-2007, 09:29 AM
To change disk size in items I had to create a new script component set and use FeatureAddItem before call SdFeatureDialog2 dialog.
The items are displayed correctly but I have a problem.
I need that my first item bet a FEATURE_FIELD_FILENEED. It seems this File Need option only works when we use the default MEDIA that captures all the information from the Program Feature list.
Is there a way to not allow the user to deselect an item when I set MEDIA with a new script?


06-16-2007, 09:14 AM
Until now I could not find a way to avoid the user to deselect an option when using created script. FeatureAddItem and FeatureSetData functions does not have a way to lock the selection.
Any idea?

04-22-2008, 09:43 PM
I'm having the same problem.

I have a feature that contains various items that need post-processing after the install. The problem is that after the feature is installed, all the item sizes are listed as zero by SdFeatureDialog2 (i.e., in OnFirstUIAfter, OnMaintUIAfter).

(FWIW, this happens on first install and on "Modify". If I do a "Repair" they're fine.)

My work-around is to create ascript-generated feature to pass to SdFeatureDialog2. I can find no way to specify that the first sub-feature is "required."

If I use FeatureInitialize( "NEWMEDIA", "data1.cab") then set MEDIA="NEWMEDIA" before calling SdFeatureDialog2, it works fine, but according to the User Guide, this is a Bad Thing(tm).

Any advice would be appreciated!


04-23-2008, 09:37 AM
The workaround I used was to create an event that catch the click from the user trying to unselect the feature. Then inside the handler code I select the feature again. It is not a beautiful approach but it works.