Loading
Dismissing the SdLicense2Rtf dialog immediately
Consider this installscript code:

 

function OnBegin()

 

HWND hwnd;

 

NUMBER nID;

 

BOOL result;

 

begin

 

Disable(BACKBUTTON);

 

if (SdLicense2Rtf("", "", "", SUPPORTDIR ^ "licenseAgreement.rtf", FALSE) != NEXT) then

 

abort;

 

endif;

 

hwnd = CmdGetHwndDlg(SD_DLG_LICENSE2_RTF);

 

nID = DLG_CLOSE;

 

result = FALSE;

 

SdCloseDlg(hwnd, nID, result);

 

SdShowMsg("Delaying...", TRUE);

 

Delay(5);

 

SdShowMsg("Delaying...", FALSE);

 

end;

 

Can someone tell me why the license dialog is never dismissed even after the SdCloseDlg function is called? I wanted to get rid of the license dialog immediately after the user clicks next, but no matter what I try, the dialog hangs around. The subsequent code that displays the "Delaying..." message just overlays itself on top of the License dialog.

 

Does anyone know of a reliable way to dismiss the license dialog as soon as the user accepts it and clicks on NEXT?

 

P.S: I have tried EndDialog/ReleaseDialog without any success.

  • Community Manager (Flexera Software)

    For one possible cause, if you haven't yet, perhaps look at Disable(DIALOGCACHE) and Enable(DIALOGCACHE)?
  • I will check it out right away but just a quick observation:

     

    The reason the code I posted probably didn't work was because the implementation of the function SdLicense2Rtf actually calls the EndDialog/ReleaseDialog pair internally (I looked it up in the SdLicense2Dlg.rul file). So by the time I call CmdGetHwndDlg, the dialog is long gone. However that still doesn't explain why the dialog hangs around after SdLicense2Rtf returns.

     

    That leads to me your suggestion.. I will report back in a few.
    Expand Post
  • " RobertDickau wrote:

     

    For one possible cause, if you haven't yet, perhaps look at Disable(DIALOGCACHE) and Enable(DIALOGCACHE)? "

     

    That did it! Robert, you are a life saver.

Loading
Dismissing the SdLicense2Rtf dialog immediately