View Full Version : JRE always installs, even when shouldn't

02-24-2005, 09:36 AM
I have an Installsheild project with two main features, a server and a client. The server feature requires the JRE, the client does not, so I have the JRE object under the server feature as a sub-feature . My default settings for both my setup types select the client and not the server feature , but whenever I run my installer the JRE is installed on a new installation even if I only have the client feature selected. I have tried using the function FeatureSelectItem(MEDIA, "Server\\JRE 1.4.2_03", FALSE); to no avail. I have double checked the name of the JRE object against the name I used in the function call and it is the same. I have gone over all the settings I know of that affect this and they all seem correct. What am I missing here?

02-24-2005, 12:31 PM
Found the problem I was having, which had two parts:
1) If you use SdSetupTypeEx after feature selection, it resets your selected features to defaults, which turns them on apparantly. (This I had run across a while back, but expected my call to FeatureSelectItem to deselect the main feature to handle it)

2) When you use the FeatureSelectItem function on a top-level feature, it does not deselect the object below it, or at least it was not changing the selection for the JRE object.

The combination of those two function calls in my install script caused the problem. Once I added a call to FeatureSelectItem to deselect the JRE under the main feature, the JRE no longer installed when its main feature was not selected.