欢迎光临
我们一直在努力

看人家用使用InstallShield制作ASP安装程序 (续4)

建站超值云服务器,限时71元/月

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

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 看人家用使用InstallShield制作ASP安装程序 (续4)
分享到: 更多 (0)