PDA

View Full Version : How to add event handler OnFirstUIAfter



mkvtrp
10-23-2014, 03:09 AM
Hi Friends,

I would like know, how to add the event handler named 'OnFirstUIAfter' to the RUL file with Installsheild 2014 DE?



Thanks,
Prasanth

ch_eng
10-23-2014, 10:59 AM
Prasanth,

If you have an InstallScript project, you should be able to do the following:

1) Click the "Installation Designer" tab in your project
2) Expand "Behavior and Logic" in the tree on the left
3) Click "InstallScript" in the tree on the left
4) Make sure you have "Setup.rul" selected
5) In the first dropdown for that file, click "After Move Data"
6) In the second dropdown for that file, click "OnFirstUIAfter" and it should populate the following code in your Setup.rul:


//---------------------------------------------------------------------------
// OnFirstUIAfter
//
// First Install UI Sequence - After Move Data
//
// The OnFirstUIAfter event called by OnShowUI after the file transfer
// of the setup when the setup is running in first install mode. By default
// this event displays UI that informs the end user that the setup has been
// completed successfully.
//
// Note: This event will not be called automatically in a
// program...endprogram style setup.
//---------------------------------------------------------------------------
function OnFirstUIAfter()
STRING szTitle, szMsg1, szMsg2, szOpt1, szOpt2;
NUMBER bvOpt1, bvOpt2;
begin

ShowObjWizardPages(NEXT);

szTitle = "";
szMsg1 = "";
szMsg2 = "";
szOpt1 = "";
szOpt2 = "";
bvOpt1 = FALSE;
bvOpt2 = FALSE;

//{{IS_SCRIPT_TAG(Dlg_SdDinishEx)
if ( BATCH_INSTALL ) then
SdFinishReboot ( szTitle , szMsg1 , SYS_BOOTMACHINE , szMsg2 , 0 );
else
SdFinish ( szTitle , szMsg1 , szMsg2 , szOpt1 , szOpt2 , bvOpt1 , bvOpt2 );
endif;
//}}IS_SCRIPT_TAG(Dlg_SdDinishEx)
end;


HTH

mkvtrp
10-29-2014, 12:12 AM
Thanks!, It worked