cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
arshia555
Level 3

Custom Dialog Problems

Hello and thanks for your support.
(sorry for my bad ENG)

I have a problem with show Install dialogs.

I used installshield script examples and added some dialogs but when I clicked on back button it have problem but in msi projects its possible to control dialog buttons without programming but in installscript project its possible by programming.

How can I show dialogs that I want with valid back and next buttons?

for example:
1)SdBitmap 2)Welocme 3)SdLicenseEx 4)SdCustomerInformationEx 5)SdFeatureDialogAdv
Labels (1)
0 Kudos
(3) Replies
jclark102
Level 4

You're looking for a result of your dialog. Something like this should work for you, I just took a code snippet from one of our projects:


///////////////////////////////////////////////////////////////////////////////
//
// FUNCTION: OnFirstUIBefore
//
// EVENT: FirstUIBefore event is sent when installation is run for the first
// time on given machine. In the handler installation usually displays
// UI allowing end user to specify installation parameters. After this
// function returns, ComponentTransferData is called to perform file
// transfer.
//
///////////////////////////////////////////////////////////////////////////////
function OnFirstUIBefore()
NUMBER nResult, nSetupType, nvSize;
STRING szTitle, szMsg, szQuestion, svName, svCompany, szFile;
STRING szLicenseFile;
STRING sProp, sValue, szData;
STRING szInstallPath;
NUMBER nBuffer;
LIST list, listStartCopy;
BOOL bCustom;
begin

SHELL_OBJECT_FOLDER = @PRODUCT_NAME;

nBuffer = 4096;

nSetupType = TYPICAL;

Dlg_SdWelcome:
szTitle = "";
szMsg = "";
nResult = SdWelcome(szTitle, szMsg);
if (nResult = BACK) goto Dlg_SdWelcome;

szTitle = "";
svName = "";
svCompany = "";

Dlg_SdLicenseRtf:
szTitle = "";
szMsg = "";
nResult = SdRichTextDialog(szTitle, szMsg, "", "EULA.RTF", "SdLicenseRtf", SD_NDLG_LICENSE, "", "");
if (nResult = BACK) goto Dlg_SdWelcome;

Dlg_SdReleaseNotesRtf:
szTitle = "";
szMsg = "";
nResult = SdRichTextDialogReadme(szTitle, szMsg, "", "README.RTF", "dlgWAVEReadme", 0, "WAVEReadme", ISUSER);
if (nResult = BACK) then
goto Dlg_SdLicenseRtf;
else // If they select the button with control number 22, show them the checklist.
if( nResult = 22 ) then
LaunchApp("NOTEPAD.EXE", "\"" + SUPPORTDIR ^ "CHECKLIST.TXT\"");
goto Dlg_SdReleaseNotesRtf;
endif;
endif;

Dlg_SdFeatureTree:
szTitle = "";
szMsg = "";
if (nSetupType = CUSTOM) then
nResult = SdFeatureTree(szTitle, szMsg, INSTALLDIR, "", 2);
if (nResult = BACK) then
goto Dlg_SdReleaseNotesRtf;
endif;
endif;

// setup default status
Enable(STATUSEX);

return 0;
end;


Not the cleanest code, but it should get you started.
0 Kudos
arshia555
Level 3

😄 Thanks a lot,

but there is some problem with the script and when I comile it, it has 2 errors like "Undefined SdRichTextDialogReadme".
(I attached the erorrs picture file)

another one is dlg_featuretree that you used doesn't appear in the setup. 
0 Kudos
BrHartmann
Level 7

having a label for the last dialog (in the above case, "Dlg_SdFeatureTree") is not strictly required, as there is no later dialog which would need to go back to it. However, it makes the install script code a bit more readable.

Your compile errors are most likely due to incorrect parameters in the function calls. I would recommend searching for each of those functions in the InstallShield help (F1, then "Search" tab) to get a detailed description of what is expected for each parameter. There is generally also a link in the help pages to some example code for each of these dialog functions.
0 Kudos