Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 2

Need help regarding the Console code for Custom Dialog.

Hi all,

I have to created the custom dialog with:
1) Lable
2) Textfield
2) Radio buttons

However When I run the installer in console mode, the custom dialogs fields are not visible.
So I am writing the "console code” for these Custom Dialogs.
If anyone having any idea regarding the console code please let me know.

Thanks in advance
Labels (1)
0 Kudos
(2) Replies
Level 7

Can you be more specific on what you are trying to do? Are you wondering how to write console mode code?
0 Kudos
Level 9

You need to select the Console Events tab on the bottom window of the Custom dialog and add the custom code for for it. You also need to do the same for Silent if you need to do any type of checking.

I have a Product Key Dialog and this is how I set it up: click the Console Event - select consoleInteraction from the 'Event:' drop down - it will add the consoleInteraction method - enter the code.

I have one text box on my dialog with the property PRODUCTKEY:

public void consoleInteractionProductKey(com.installshield.event.ui.ISDialogContext context)
TTYDisplay tty = ((ConsoleWizardUI)context.getWizardUI()).getTTY();

try {
String PRODUCTKEY = context.resolveString("$V(PRODUCTKEY)");
PRODUCTKEY = tty.prompt("Please Enter 18 Character Product Key: ", PRODUCTKEY);
context.getServices().getISDatabase().setVariableValue("PRODUCTKEY", PRODUCTKEY);

tty.printLine("Product Key = " + PRODUCTKEY);

}catch (ISDatabaseException dbe) {
context.getServices().logEvent(this, Log.ERROR, dbe);
}catch (ServiceException e) {
context.getServices().logEvent(this, Log.ERROR, e);
0 Kudos