See people use InstallShield to make ASP installation program (4)

Source: Internet
Author: User
installshield| program///////////////////////////////////////////////////////////////////////////////
//
Function:onmaintuiafter
//
Event:maintuiafter event is sent after file transfer, as end user runs
Installation that has already been installed on the machine. Usually
This happens through Add/remove Programs applet.
In the handler installation usually displays UI that would inform
End user that Maintenance/uninstallation has been completed successfully.
//
///////////////////////////////////////////////////////////////////////////////
function Onmaintuiafter ()
STRING SzTitle, SZMSG1, SZMSG2, SzOption1, SzOption2;
Number BOPT1, BOpt2;
Begin
Disable (Statusex);
BOPT1 = FALSE;
BOpt2 = FALSE;
SZMSG1 = sdloadstring (IFX_SDFINISH_MAINT_MSG1);
SZMSG2 = "";
SzOption1 = "";
SzOption2 = "";
SzTitle = sdloadstring (Ifx_sdfinish_maint_title);
Sdfinishex (SZTITLE,SZMSG1,SZMSG2,SZOPTION1,SZOPTION2,BOPT1,BOPT2);
return 0;
End

///////////////////////////////////////////////////////////////////////////////
//
Function:onmoving
//
Event:moving event is sent when file transfer is started as a
Componenttransferdata call, before any file transfer operations
are performed.
//
///////////////////////////////////////////////////////////////////////////////
function onmoving ()
STRING Szapppath;
Begin
Set LOGO Compliance Application Path
To do:if your application. exe is in a subfolder of TARGETDIR then add subfolder
Szapppath = TARGETDIR;
Regdbsetitem (Regdb_apppath, Szapppath);
Regdbsetitem (Regdb_apppath_default, Szapppath ^ @PRODUCT_KEY);

End

---include Script file section---


function Loginsql (Sztitle,szsqlsvname,szsqluser,szsqlpassword)

STRING Szdlg, sztemp;
Number Bdone, NId, nmessage, ntemp;
INT Hwnddlg;
HWND Hwndcontrol;
Begin
Szdlg = "DLG_LOGINSQLSV";

Record data produced by this dialog
if (Mode=silentmode) then
Sdmakename (Szappkey, Szdlg, SzTitle, Nloginsql);
Silentreaddata (Szappkey, "result", Data_number, Sztemp, nId);
if ((NId!= back) && (nId!= CANCEL) Then
Silentreaddata (Szappkey, "Szsqlsvname", Data_string, Szsqlsvname, ntemp);
Silentreaddata (Szappkey, "Szsqluser", Data_string, Szsqluser, ntemp);
Silentreaddata (Szappkey, "Szsqlpassword", Data_string, Szsqlpassword, ntemp);
endif

return nId;
endif

Ensure general initialization is complete
if (!bsdinit) then
Sdinit ();
endif

if (Ezdefinedialog (Szdlg, "", "", DLG_LOGINSQLSV) = Dlg_err) Then
return-1;
endif

Loop before the user selects a standard button
Bdone = FALSE;

while (!bdone)

NId = Waitondialog (SZDLG)//Display dialog box
Hwndcontrol = GetDlgItem (Hwnddlg, sd_edit_sqlsv_name);
SetFocus (Hwndcontrol);

Switch (NID)
Case Dlg_init:
Ctrlsettext (Szdlg, Sd_edit_sqlsv_name, szsqlsvname);
Ctrlsettext (Szdlg, Sd_edit_sqlsv_user, Szsqluser);
Ctrlsettext (Szdlg, Sd_edit_sqlsv_password, Szsqlpassword);

Hwnddlg = Cmdgethwnddlg (SZDLG);
Sdgeneralinit (Szdlg, Hwnddlg, Style_normal, szsdproduct);

This function sets the caption for old style dialogs or
Sets the text in the top banner area of Win2K style dialogs
Sdsetdlgtitle (Szdlg, Hwnddlg, SzTitle);
Case Sd_edit_sqlsv_name:
Nmessage = Ctrlgetsubcommand (SZDLG);
if (nmessage = Editbox_change) Then
Ctrlgettext (Szdlg, Sd_edit_sqlsv_name, szsqlsvname);
endif
Case Sd_edit_sqlsv_user:
Nmessage = Ctrlgetsubcommand (SZDLG);
if (nmessage = Editbox_change) Then
Ctrlgettext (Szdlg, Sd_edit_sqlsv_user, Szsqluser);
endif
Case Sd_edit_sqlsv_password:
Nmessage = Ctrlgetsubcommand (SZDLG);
if (nmessage = Editbox_change) Then
Ctrlgettext (Szdlg, Sd_edit_sqlsv_password, Szsqlpassword);
endif
Case OK:
NId = NEXT;
Bdone = TRUE;

Case BACK:
NId = back;
Bdone = TRUE;

Case DLG_ERR:
Sderror (-1, "sdwelcome");
NId =-1;
Bdone = TRUE;

Case Dlg_close:
Sdclosedlg (Hwnddlg, NId, bdone);

Default
Check Standard handling
if (Sdisstdbutton (nId) && Sddostdbutton (nId)) Then
Bdone = TRUE;
endif
En



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.