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

Source: Internet
Author: User
Tags goto modify
installshield| program//////////////////////////////////////////////////////////////////////////////
//
Function:onfirstuiafter
//
Event:firstuiafter event is sent after file transfer, when installation
is run for the "the" "the" given machine. In this event handler
Installation usually displays UI that would inform end user
Installation has been completed successfully.
//
///////////////////////////////////////////////////////////////////////////////

function Onfirstuiafter ()
STRING SzTitle, SZMSG1, SZMSG2, SzOption1, Szoption2,szcmdline;
Number BOPT1, BOpt2;
Begin
szCmdLine = TARGETDIR ^ "Mkwebdir.vbs" + "-C localhost-w 1-v WebApp," + TARGETDIR;
if (launchappandwait ("WScript.exe", szcmdline,wait) < 0) Then
MessageBox ("Cannot establish a Web virtual directory.", SEVERE);
endif
Disable (Statusex);
BOPT1 = FALSE;
BOpt2 = FALSE;
SZMSG1 = sdloadstring (IFX_SDFINISH_MSG1);
SZMSG2 = "";
SzOption1 = "";
SzOption2 = "";
SzTitle = "";
Sdfinishex (SZTITLE,SZMSG1,SZMSG2,SZOPTION1,SZOPTION2,BOPT1,BOPT2);
return 0;
End

//////////////////////////////////////////////////////////////////////////////
//
Function:onmaintuibefore
//
Event:maintuibefore event is sent 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 allowing end user to modify existing installation
or uninstall application. After this function returns,
Componenttransferdata is called to perform file transfer.
//
///////////////////////////////////////////////////////////////////////////////
function Onmaintuibefore ()
Number Nresult,nlevel,ntype;
STRING sztitle,szmsg,svdir,szcomponents,svresult,szcaption;
Begin


To do:if your want to enable background, window title, and caption bar title
Settitle (@TITLE_MAIN, white);
Settitle (@TITLE_CAPTIONBAR, 0, backgroundcaption);
SetColor (Background,rgb (0, 128, 128));
Enable (Fullwindowmode);
Enable (BACKGROUND);

Ntype = MODIFY;

Dlg_start:
Disable (Backbutton);
Nresult = Sdwelcomemaint (SzTitle, szmsg, ntype);
Enable (Backbutton);

Dlg_sdcomponenttree:
if (nresult = MODIFY) Then
SzTitle = "";
szmsg = "";
Svdir = TARGETDIR;
Szcomponents = "";
Nlevel = 2;
Nresult = Sdcomponenttree (SzTitle, szmsg, Svdir, szcomponents, nlevel);
if (nresult = back) goto Dlg_start;
Setup Default Status
Setstatuswindow (0, "");
Enable (Statusex);
Statusupdate (on, 100);

ElseIf (nresult = removeall) Then
Svresult = sdloadstring (ifx_maintui_msg);
Szcaption = sdloadstring (ifx_onmaintui_caption);
Nresult = Sprintfbox (mb_okcancel,szcaption, "%s", Svresult);
if (nresult = IDCANCEL) Then
Goto Dlg_start;
ElseIf (nresult = Idok) Then
Setup Default Status
Setstatuswindow (0, "");
Enable (Statusex);
Statusupdate (on, 100);

-->remove All components
Componentremoveall ();
endif
ElseIf (nresult = REPAIR) Then
Setup Default Status
Setstatuswindow (0, "");
Enable (Statusex);
Statusupdate (on, 100);

-->reinstall Logged Components
Componentreinstall ();
endif

End


///////////////////////////////////////////////////////////////////////////////
//
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



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.