This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Uninstaller: Detect Feature Selections...HELP?!?!?!
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 20, 2006
07:30 AM
Uninstaller: Detect Feature Selections...HELP?!?!?!
Hello to all,
I would like to know how we can detect the selected (checked/unchecked) Feature from the Uninstall Feature Panel? During the "Install", making use of "isActive()" for the feature/bean works great and will properly tell me if the Feature is selected or not selected (checked/unchecked). However, during the Uninstall, this ALWAYS returns true regardless of the Feature's state of being selected for removal. WHY?????? I have also tried using "isActiveForUninstall()" against the installed Software object. But, this always returns FALSE regardless of the feature selected for removal. WHY???? One would think there was a simple IS API to call and retrieve the checked state of the dynamically built Feature tree - but there is nothing I can find. Any ideas would be greatly appreciated.
Thanks!
I would like to know how we can detect the selected (checked/unchecked) Feature from the Uninstall Feature Panel? During the "Install", making use of "isActive()" for the feature/bean works great and will properly tell me if the Feature is selected or not selected (checked/unchecked). However, during the Uninstall, this ALWAYS returns true regardless of the Feature's state of being selected for removal. WHY?????? I have also tried using "isActiveForUninstall()" against the installed Software object. But, this always returns FALSE regardless of the feature selected for removal. WHY???? One would think there was a simple IS API to call and retrieve the checked state of the dynamically built Feature tree - but there is nothing I can find. Any ideas would be greatly appreciated.
Thanks!
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 20, 2006
08:56 AM
I have not tried this on uninstall but I use it on my features dialog!
Instead of using isActive() try using something like:
String checked = arg0.resolveString("$P(FeatureBeanID.active)")
This will return a true or false string!
You can do something like:
if (arg0.resolveString("$P(FeatureBeanID.active)").equalseIgnoreCase("true") ){
its checked!
}
You can also use this for a Condition to any Custom Action or Dialog in the sequences with a StringComparison with $P(FeatureBeanID.active) = true
Regards,
Tom
Instead of using isActive() try using something like:
String checked = arg0.resolveString("$P(FeatureBeanID.active)")
This will return a true or false string!
You can do something like:
if (arg0.resolveString("$P(FeatureBeanID.active)").equalseIgnoreCase("true") ){
its checked!
}
You can also use this for a Condition to any Custom Action or Dialog in the sequences with a StringComparison with $P(FeatureBeanID.active) = true
Regards,
Tom
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 20, 2006
11:33 AM
enanrum wrote:
I have not tried this on uninstall but I use it on my features dialog!
Instead of using isActive() try using something like:
String checked = arg0.resolveString("$P(FeatureBeanID.active)")
This will return a true or false string!
You can do something like:
if (arg0.resolveString("$P(FeatureBeanID.active)").equalseIgnoreCase("true") ){
its checked!
}
You can also use this for a Condition to any Custom Action or Dialog in the sequences with a StringComparison with $P(FeatureBeanID.active) = true
Regards,
Tom
Thanks for the reply, but again - these do not work during Uninstall. It is as if NONE of the .active, .isActive(), or isActiveForUninstall() - work or apply to the Uninstall phase. 😞
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 20, 2006
02:44 PM
D'oh!
Yah the uninstaller is funny - They must do something different here because they even show features or sub-features that were not visible on install in the uninstaller feature dialog!!!!
Ugly!
Sorry I couldn't help!
Yah the uninstaller is funny - They must do something different here because they even show features or sub-features that were not visible on install in the uninstaller feature dialog!!!!
Ugly!
Sorry I couldn't help!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 16, 2007
03:36 PM
Did you ever find a solution to this? I'm having the same problem - I can easily check if a feature has been selected for install, but the same procedure does not work for Uninstall.
Anybody have any ideas?
Thanks,
Paul
Anybody have any ideas?
Thanks,
Paul
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 19, 2007
10:49 AM
I finally got it to work - if anybody else is having the same problem, this is the solution I found.
Within the UninstallFeature dialog, I was trying to check if a feature was selected by doing the following:
String F1act = context.getServices().resolveString("$P(App1.active)");
This method works fine for installing, but NOT uninstalling. You need to use:
String F1act = context.getServices().resolveString("$P(App1.activeForUninstall)");
So, for an uninstall window with two features listed, I was able to make sure that at least one was selected before proceeding by doing the following:
public void queryExitUninstallFeature(com.installshield.event.ui.ISDialogQueryContext context)
{
String F1act = context.getServices().resolveString("$P(App1.activeForUninstall)");
String F2act = context.getServices().resolveString("$P(App2.activeForUninstall)");
if (F1act.equals("false") && F2act.equals("false"))
{
context.getWizardUI().displayUserMessage(
context.getServices().resolveString(
context.getISFrame().getTitle()),
context.getServices().resolveString(
"Please select at least one feature before Proceeding!"),
UserInputRequest.MESSAGE);
//context.logEvent(this, Log.ERROR, "Feature Test");
context.setReturnValue(false);
}
}
Thanks,
Paul
Within the UninstallFeature dialog, I was trying to check if a feature was selected by doing the following:
String F1act = context.getServices().resolveString("$P(App1.active)");
This method works fine for installing, but NOT uninstalling. You need to use:
String F1act = context.getServices().resolveString("$P(App1.activeForUninstall)");
So, for an uninstall window with two features listed, I was able to make sure that at least one was selected before proceeding by doing the following:
public void queryExitUninstallFeature(com.installshield.event.ui.ISDialogQueryContext context)
{
String F1act = context.getServices().resolveString("$P(App1.activeForUninstall)");
String F2act = context.getServices().resolveString("$P(App2.activeForUninstall)");
if (F1act.equals("false") && F2act.equals("false"))
{
context.getWizardUI().displayUserMessage(
context.getServices().resolveString(
context.getISFrame().getTitle()),
context.getServices().resolveString(
"Please select at least one feature before Proceeding!"),
UserInputRequest.MESSAGE);
//context.logEvent(this, Log.ERROR, "Feature Test");
context.setReturnValue(false);
}
}
Thanks,
Paul
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)