//////////////////////////////////////////////////////////////////////////////
//
// function: onfirstuiafter
//
// event: firstuiafter event is sent after file transfer, when installation
// is run for the first time on given machine. in this event handler
// installation usually displays ui that will inform end user that
// 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 ("不能建立web 虚拟目录.",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 when 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 you want to enable background, window title, and caption bar title
// settitle( @title_main, 24, 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, when 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 will 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 result of
// 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 —
