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

Requiring End Users to Scroll Through the LicenseAgreement - Installscript

Hi,

There is no event being triggered for scroll in the License Dialog, this worked in IS 5.5 but not working in IS 2019
Can someone point me to a work around?

Regards,
Phaninder G

0 Kudos
(4) Replies
Jenifer
Flexera Alumni

Hi @pgattu ,

 

When you say "There is no event being triggered for scroll in the License Dialog",is that something you could get as outcome of following approach given here:

https://helpnet.flexerasoftware.com/installshield19helplib/helplibrary/EulaScrollWatcher.htm

Or 

Do you have any custom script which isn't working in InstallShield 2019?If so please attach here,it would be helpful to assist you with.

 

Thanks,

Jenifer

0 Kudos

Hi @Jenifer ,

To answer first question 
https://helpnet.flexerasoftware.com/installshield19helplib/helplibrary/EulaScrollWatcher.htm

As far as i know this is not applicable to installscript project isn't it?

To answer your second question
Yes its a custom dialog and  corresponding code is being pasted here

DefineDialog (szDlg, hInstance, szDLLName, SWD_NDLG_LICENSE, szDialog, 0, HWND_INSTALL, DLG_MSG_ALL|DLG_CENTERED);

// Loop in dialog until the user selects a standard button
bDone = FALSE;

while (!bDone)

nId = WaitOnDialog (szDlg);

switch(nId)

case DLG_INIT:

// Set the Dialog Title and Button text, this is done with Windows API calls
// that have been loaded from the USER32.DLL. First we have to get the Hwnd.
hWndCustom = GetActiveWindow();
hWndEula = GetDlgItem (hWndCustom, IDC_EDIT_EULA);
hWndYes = GetDlgItem (hWndCustom, SD_PBUT_YES);

SendMessage (hWndEula, EM_FMTLINES, 1, 0);

try
display_license(SUPPORTDIR ^ "license.txt", hWndEula);
catch
SprintfBox( WARNING,"Error", "display_license call failed with error %s", FormatMessage( Err.Number ) );
MessageBox(Err.Number , SEVERE);
endcatch;

// Find out if we are at the end of the scroll bar
nPrevScrollPos = 0;
GetScrollRange (hWndEula, SB_VERT, &nScrollMinPos, &nScrollMaxPos);
SetScrollPos (hWndEula, SB_VERT, nScrollMaxPos, TRUE);
nScrollMaxPos = GetScrollPos (hWndEula, SB_VERT);
SetScrollPos (hWndEula, SB_VERT, 0, TRUE);

// Set the Text that will appear in the buttons and titles of the
// custom dialogs. This is to support multi Languages.
svYesButton = "&" + @YES_BUTTON_TEXT;
svNoButton = "&" + @NO_BUTTON_TEXT;
svBackButton = "< &" + @BACK_BUTTON_TEXT;
svWindowTitle = @SHOW_LICENSE_DLG_TITLE;
szHeader = @SHOW_LICENSE_HEAD;
szFooter = @SHOW_LICENSE_FOOT;

CtrlSetText (szDlg, SD_PBUT_YES, svYesButton);
CtrlSetText (szDlg, SD_PBUT_NO, svNoButton);
CtrlSetText (szDlg, SD_PBUT_BACK, svBackButton);
CtrlSetText (szDlg, SD_LICENSE_HEADER, szHeader);
CtrlSetText (szDlg, SD_LICENSE_FOOTER, szFooter);

// Remove ability to click Yes until the agreement is scrolled to the bottom
EnableWindow (hWndYes, FALSE);

// Set Title text
SetWindowText (hWndCustom, svWindowTitle);

case SD_PBUT_BACK:
// Process the Back button.
bDone = TRUE;
Ret = BACK;

case SD_PBUT_YES:
// Process the Yes button.
bDone = TRUE;
Ret = YES;

case SD_PBUT_NO:

// Process the Yes button.
bDone = FALSE;
Do (EXIT);

// Process the close dialog box button.
case DLG_CLOSE:
bDone = FALSE;
Do (EXIT);

// Process dialog box errors.
case DLG_ERR:
MessageBox (@MSG_INTERNAL_DIALOG_ERR, SEVERE);
bDone = TRUE;

default:
nScrollPos = GetScrollPos (hWndEula, SB_VERT);

if (nScrollPos != nPrevScrollPos) then
nPrevScrollPos = nScrollPos;

if (nScrollPos >= nScrollMaxPos) then
EnableWindow (hWndYes, TRUE);
else
EnableWindow (hWndYes, FALSE);
endif;
endif;

// check standard handling
if (SdIsStdButton( nId ) && SdDoStdButton( nId )) then
bDone = TRUE;
endif;

endswitch;

endwhile;

EndDialog( szDlg );
ReleaseDialog( szDlg );

return Ret;
end;

Basically my problem is that I'm not being able to get into default case, whereas in IS 5.5 Professional this code worked and is working properly without any issue

Please help me in this regard

Regards
pgattu

0 Kudos

Hi @Jenifer 

Can you please help me in this regard?

0 Kudos

Hi @pgattu ,

 

i have a script which has similar method calls as mentioned in your previous thread but with some additional function calls.May be you need to make those to get it working.

code is bit long so i am attaching files in folder.

Please find the attached folder in which you will see 2 folders:

  • BIN-which has sample setup.exe,do run that it will show you lot of dialogs to test the behavior.Select ISEXLicense from that which will depict similar requirement that you want.
  •  Script_Files-The code file(.rul) for that specific dialog is under Script_Files,exlic.rul.Go through the function ISExLicense.That can help you with.

 

Hope it helps,

Thanks,

Jenifer

0 Kudos