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: Installscript Custom dialog
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
‎Oct 07, 2007
11:43 PM
Installscript Custom dialog
Having come from a basic MSI background I am having a little difficulty customising and existing InstallShield dialog.
I want to change the SQLServerSelectLoginDialog to look like the attached picture.
What I can't work out how to do is to dispaly the dialog with some default values and to enable/disable the combo box depending the radio button selection.
I want the SQL Server Connection to default to "Use existing SQL Server already installed on this computer". If this option is chosen then ALL fields on the dialog box should be enabled.
If the use chooses to install a new SQL Server instance, then every option on the dialog box should be disabled so the user can only then choose next/back/cancel or to change their radio control back to "use existing SQL Server..."
How can I do this? It seemed quite easy using BASIC MSI dialog editor, but not so easy now that I'm using InstallScript.....
I want to change the SQLServerSelectLoginDialog to look like the attached picture.
What I can't work out how to do is to dispaly the dialog with some default values and to enable/disable the combo box depending the radio button selection.
I want the SQL Server Connection to default to "Use existing SQL Server already installed on this computer". If this option is chosen then ALL fields on the dialog box should be enabled.
If the use chooses to install a new SQL Server instance, then every option on the dialog box should be disabled so the user can only then choose next/back/cancel or to change their radio control back to "use existing SQL Server..."
How can I do this? It seemed quite easy using BASIC MSI dialog editor, but not so easy now that I'm using InstallScript.....
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 08, 2007
09:12 AM
First you want to clone the dialog I think, so you can create a function to perform the tasks you need.
Just get the Control Identifiers of all fields and follow this URL:
http://helpnet.installshield.com/robo/projects/helplibdevstudio9/Dialogs_ImplementStandard.htm
Look up 'Custom Dialog Functions' in the help for a list of functions you can use.
Should be enough to get you started.
Just get the Control Identifiers of all fields and follow this URL:
http://helpnet.installshield.com/robo/projects/helplibdevstudio9/Dialogs_ImplementStandard.htm
Look up 'Custom Dialog Functions' in the help for a list of functions you can use.
Should be enough to get you started.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 08, 2007
07:36 PM
Perfect. Thankyou for that!
I only have one question. How do I clone the dialog? If I right click on the dialog in Dialogs View, Clone option is disabled. The only option is Edit.
I only have one question. How do I clone the dialog? If I right click on the dialog in Dialogs View, Clone option is disabled. The only option is Edit.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 09, 2007
09:11 AM
Select Edit first, and then the options open up for you.
I should also say that this dialog in stock form probably has somewhat complex script behind the scenes. I don't see it being too productive to write the entire thing from scratch just to enable/disable fields.
If you look in C:\Program Files\Macrovision\IS2008\Script\SQLRunTime\Src there are .rul files for whatever dialogs you're trying to modify.
I have never tried it, but I think you can just modify that script to do what you want. Just make a copy of it and work from that file.
I should also say that this dialog in stock form probably has somewhat complex script behind the scenes. I don't see it being too productive to write the entire thing from scratch just to enable/disable fields.
If you look in C:\Program Files\Macrovision\IS2008\Script\SQLRunTime\Src there are .rul files for whatever dialogs you're trying to modify.
I have never tried it, but I think you can just modify that script to do what you want. Just make a copy of it and work from that file.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 09, 2007
12:29 PM
I just happened to be researching this today. Here's what I found:
Make sure you define the Control ID of the control
Make sure you declare the handles you'll be using.
I actually do this in the DLG_INIT case in the loop. I don't know if you have to.
In the Radio button case of the loop, check the condition and then enable/disable.
Hope that helps!
-spdygnlz-
Make sure you define the Control ID of the control
#define YOUR_CTRL_ID 1303
#define RADIOBUTTON_ID 1304
Make sure you declare the handles you'll be using.
function MyCustomDlg()
HWND hDlg, hCtrl;
begin
I actually do this in the DLG_INIT case in the loop. I don't know if you have to.
case DLG_INIT:
// Start by getting a handle to the dialog
hDlg = CmdGetHwndDlg("YourDialogName");
In the Radio button case of the loop, check the condition and then enable/disable.
if (CtrlGetState("YourDialogName", RADIOBUTTON_ID) == BUTTON_CHECKED) then
// Get a handle to the control
hCtrl = GetDlgItem(hDlg, YOUR_CONTROL_ID);
// Disable (or Enable) the control
EnableWindow(hCtrl, FALSE);
endif;
Hope that helps!
-spdygnlz-
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 06, 2007
07:07 AM
Excellent post.
works perfect thanks a bunch
--Mike
works perfect thanks a bunch
--Mike