当前位置: 首页 > 图文教程 > 网络编程 > ASP > 使用InstallShield制作ASP安装程序(6)

ASP
用密码保护页面 (II)
用密码保护页面 (III)
简单的文件目录浏览源程序
ASP中的函数应用方法及应用举例(一)
ASP中的函数应用方法及应用举例(二)
完整的访问统计系统(一:数据库篇)
完整的访问统计程序(二 程序篇)
完整的访问统计程序(三 应用篇)
一个提供用户输入时期的绝好程序之(一)
一个提供用户输入时期的绝好程序之(二)
构建你的网站新闻自动发布系统之五
构建你的网站新闻自动发布系统之六
完整的访问统计程序(二 程序篇)
完整的访问统计程序(三 应用篇)
ASP环境下邮件列表功能的实现 (一)
ASP环境下邮件列表功能的实现 (二)
ASP环境下邮件列表功能的实现 (三)
ASP环境下邮件列表功能的实现 (四)
ASP进阶之文章在线管理更新(1)
ASP进阶之文章在线管理更新(2)

使用InstallShield制作ASP安装程序(6)


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 30 ::
收藏到网摘: n/a

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