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
- :
- sorry reply late
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 15, 2009
06:52 PM
Custom event does not work in uninstall sequence
In uninstall sequence, i added a custom event to detect silent mode, but it is not invoked when i run uninstall. Please kindly help. Appreciate your help.
i am using the following code from the "help"
TASK
To determine the interface being used:
1. First, you need to get an instance of the UI using the following code:
WizardUI ui = getWizard().getUI();
2. Next, use the Java instanceof operator to check if the UI is an instance of the AWTWizardUI, SwingWizardUI, or ConsoleWizardUI class. If it is not an instance of any of these classes, then the installation is running in silent mode.
if (ui instanceof AWTWizardUI){
System.out.println("running in AWT mode");
}
else if (ui instanceof SwingWizardUI){
System.out.println("running in Swing mode");
}
else if (ui instanceof ConsoleWizardUI) {
System.out.println("running in Console mode");
}
else {
System.out.println("running in Silent mode");
}
3. To compile this code, you need to import classes/packages into your JAVA file so that the compiler will find the classes that are being used. At a minimum, you need to include the following classes and packages:
import com.installshield.wizard.*;
import com.installshield.wizard.awt*;
import com.installshield.wizard.console*;
import com.installshield.wizard.swing.*;
i am using the following code from the "help"
TASK
To determine the interface being used:
1. First, you need to get an instance of the UI using the following code:
WizardUI ui = getWizard().getUI();
2. Next, use the Java instanceof operator to check if the UI is an instance of the AWTWizardUI, SwingWizardUI, or ConsoleWizardUI class. If it is not an instance of any of these classes, then the installation is running in silent mode.
if (ui instanceof AWTWizardUI){
System.out.println("running in AWT mode");
}
else if (ui instanceof SwingWizardUI){
System.out.println("running in Swing mode");
}
else if (ui instanceof ConsoleWizardUI) {
System.out.println("running in Console mode");
}
else {
System.out.println("running in Silent mode");
}
3. To compile this code, you need to import classes/packages into your JAVA file so that the compiler will find the classes that are being used. At a minimum, you need to include the following classes and packages:
import com.installshield.wizard.*;
import com.installshield.wizard.awt*;
import com.installshield.wizard.console*;
import com.installshield.wizard.swing.*;
(9) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 15, 2009
07:16 PM
I'm a bit rusty with ISMP, but perhaps try this:
WizardUI ui = event.getUserInterface( );
if (ui instanceof SwingWizardUI)
// setup is running in Swing mode
else if (ui instanceof ConsoleWizardUI)
// setup is running in console mode
else
// setup is running in silent mode
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 16, 2009
01:05 PM
i will try
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 16, 2009
06:24 PM
if i put in WizardUI ui = event.getUserInterface();
it will fail the compile saying that "cannot find symbol" on event.
i guess it is because i am having the custom event calling this method and i was using WizardActionContext? The reason of this guess is i can see in help it says
WizardUI ui = getWizard().getUI();
it will fail the compile saying that "cannot find symbol" on event.
i guess it is because i am having the custom event calling this method and i was using WizardActionContext? The reason of this guess is i can see in help it says
WizardUI ui = getWizard().getUI();
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 16, 2009
08:54 PM
What is your custom event signature?
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 16, 2009
09:01 PM
i think no custom event can work in my current uninstall sequence. any idea why?
signature? onExecuting? (i added wizard action then custom event. then in "Event", select the context then select onExecuting...
signature? onExecuting? (i added wizard action then custom event. then in "Event", select the context then select onExecuting...
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 16, 2009
09:26 PM
i guess i see what you mean by signature.
for some reason, by default, the name generated upon clicking onExecuting is a name with long string appended.
now i can see it in event browser, and i cannot delete it
for some reason, by default, the name generated upon clicking onExecuting is a name with long string appended.
now i can see it in event browser, and i cannot delete it
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 17, 2009
09:36 AM
Putting aside detecting the UI mode for the moment, is your event called at all during uninstallation? (If you use JOptionPane.showMessageDialog with a message there, does something show up?)
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 20, 2009
12:53 AM
tried, i added JOptionPane.showMessageDialog, No, it does not show.
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 30, 2009
07:50 PM
is it jvm? or launcher?