Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Change Setup Type Headings


4 replies to this topic

elliottrb

elliottrb
  • Members
  • 70 posts

Posted 08 August 2003 - 19:12

Is there a way to change the Setup Types headings from Typical, Compact, or Complete? I would like to change these headings to the following:

IIS Server Install
PRG Server Install
SQL Server Install

Each of these will contain certain components with certain file groups that get installed only on certain types of boxes. Can this be done?

Thanks,
Robbie
Robert B. Elliott[br]Systems Engineer[br]Xact Radio Network, LLC.

Ozone

Ozone
  • Full Members
  • 77 posts

Posted 08 August 2003 - 20:28

Yes, you will have to call the Setup Type form as a custom dialog. (12009)

You could also edit the resource in _isres.dll with a resource editor.

NOTE: The text label of the radio buttons are not long enought to display your text. You could shorten them, or leave them blank and add the text to the text boxes 701, 702, 703...

CODE
Global definitions

// Dialog and control IDs.
#define RES_DIALOG_ID     12009   // ID of Dialog itself
#define RES_PBUT_NEXT         1   // ID of 'Next' push button
#define RES_PBUT_CANCEL       9   // ID of 'Cancel' push button
#define RES_PBUT_BACK        12   // ID of 'Back' push button

#define RES_TYPICAL_ID      501   // ID of Typical radio button
#define RES_COMPACT_ID      502   // ID of Compact radio button
#define RES_CUSTOM_ID       503   // ID of Custom  radio button
                             
#define RES_TYPICAL_TEXT    701   // ID of Typical TEXT
#define RES_COMPACT_TEXT    702   // ID of Compact TEXT
#define RES_CUSTOM_TEXT     703   // ID of Custom  TEXT  

#define RES_DIALOG_EDITBOX  301   // ID of edit box
#define RES_DIALOG_LISTBOX  401   // ID of list box


Local definitions
 
STRING  szDialogName, szDLLName, szDialog;


This script calls the form.

// Specify a name to identify the custom dialog in this setup.
  szDialogName = "CustomDialog";
 
  // Define the dialog.  Pass a null string in the second parameter
  // to get the dialog from _isuser.dll or _isres.dll.  Pass a null
  // string in the third parameter because the dialog is identified
  // by its ID in the fourth parameter.
 
  nResult = EzDefineDialog (szDialogName, "", "", RES_DIALOG_ID);
  if (nResult < 0) then      // Report an error; then terminate.
     MessageBox ("Error in defining dialog", SEVERE);
     abort;  
  endif;
 
  // Initialize the indicator used to control the while loop.  
  bDone = FALSE;
 
  // Loop until done.  
  repeat
 
  // Display the dialog and return the next dialog event.
     nCmdValue = WaitOnDialog(szDialogName); // Respond to the event.
     switch (nCmdValue)        
     
        case DLG_CLOSE:
           // The user clicked the window's close button.            
           Do (EXIT);
       
        case DLG_ERR:
           MessageBox ("Unable to display dialog. Setup canceled.", SEVERE);
           abort;        
       
        case DLG_INIT:
           // Place list of directories into list box
           CtrlSetList( szDialogName, RES_DIALOG_LISTBOX, list_FOLDERS);
           
       
           // Set the static text of the buttons.
           CtrlSetText ( szDialogName, RES_PBUT_NEXT , "&Next");          
           CtrlSetText ( szDialogName, RES_PBUT_BACK , "&Back");
           
           // Set the radio buttons
           CtrlSetText ( szDialogName, RES_TYPICAL_ID , "&IIS Server Install");          
           CtrlSetText ( szDialogName, RES_COMPACT_ID , "&PRG Server Install");          
           CtrlSetText ( szDialogName, RES_CUSTOM_ID  , "&SQL Server Install");          
           
           // Set the text in labels
           CtrlSetText ( szDialogName, RES_TYPICAL_TEXT , "IIS Server Install - your text here");          
           CtrlSetText ( szDialogName, RES_COMPACT_TEXT , "PRG Server Install - your text here");          
           CtrlSetText ( szDialogName, RES_CUSTOM_TEXT  , "SQL Server Install - your text here");          
           
        case RES_DIALOG_LISTBOX:
           // Get the current list box selection.
           CtrlGetCurSel (szDialogName, RES_DIALOG_LISTBOX, svSelection);
           
           // Put the current selection in the edit box.
           ParsePath( svDrive , svSelection ,PATH);
           CtrlSetText (szDialogName, RES_DIALOG_EDITBOX, svDrive);
                       
       
        case RES_PBUT_CANCEL:  // The user clicked the Cancel button.
           Do (EXIT);        
       
        case RES_PBUT_NEXT:
           bDone = TRUE;
       
        case RES_PBUT_BACK:            
           bDone = TRUE;
           endswitch;
           
  until bDone;  
 
  // Close the dialog box.  
  EndDialog (szDialogName);
 
  // Free the dialog box from memory.  
  ReleaseDialog (szDialogName);






elliottrb

elliottrb
  • Members
  • 70 posts

Posted 08 August 2003 - 21:13

Thanks,

I will play with this.

Rob
Robert B. Elliott[br]Systems Engineer[br]Xact Radio Network, LLC.

elliottrb

elliottrb
  • Members
  • 70 posts

Posted 08 August 2003 - 21:16

Do you think it would be easier to just pop up a dialog and ask for user input? Something like:

What is this setup for?
1. IIS Server
2. PRG Server
3. SQL Server

Then do an if statement of case statement and call the setup type that you want?

Do you think this method would work? I don't really know to much about editing the _ires.dll file and all that. But if I have to learn it I guess this would be a good way.

Thanks,
Robbie
Robert B. Elliott[br]Systems Engineer[br]Xact Radio Network, LLC.

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 09 August 2003 - 01:20

ohmy.gif Wow Ozone! Talk about doing things the hard way. ohmy.gif

Instead of hacking the resources, just rename the existing Setup Types in the IDE (tab icon looks like a series of vertical bars) and check the appropriate components.

Then just call SdSetupTypeEx instead of SetupType for the OnFirstUIBefore event.

Also, a pop-up dialog would work elliottrb, but it's better to stick with the wizard style interface whenever possible.
user posted image