论坛交流
首页办公自动化| 网页制作| 平面设计| 动画制作| 数据库开发| 程序设计| 全部视频教程
应用视频: Windows | Word2007 | Excel2007 | PowerPoint2007 | Dreamweaver 8 | Fireworks 8 | Flash 8 | Photoshop cs | CorelDraw 12
编程视频: C语言视频教程 | HTML | Div+Css布局 | Javascript | Access数据库 | Asp | Sql Server数据库Asp.net  | Flash AS
当前位置 > 文字教程 > asp教程
Tag:入门,文摘,实例,技巧,iis,表单,对象,上传,数据库,记录集,session,cookies,存储过程,注入,分页,安全,优化,xmlhttp,fso,jmail,application,防盗链,stream,组件,md5,乱码,缓存,加密,验证码,算法,ubb,正则表达式,水印,,日志,压缩,url重写,控件,函数,破解,触发器,socket,ADO,初学,聊天室,留言本,视频教程

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

文章类别:asp | 发表日期:2008-10-5 20:39:43

我现在在做ASP的安装程序,这样可以方便用户的使用。我使用的InstallShield版本是InstallShield Professional—Standard Edition6.3。
  我没有用过这个东东,问题如下:

问题一
  通过Project Wizard-generated script 做好了COPY打包工作。可是6.3版本的好象不支持主体Program...Endprogram,因为我看COPY打包的Script脚本就是通过两个Fuction实现的。所以我的脚本加不进去,除非在这两个Fuction中调用!请问是不是6.3版本不能使用Program...Endprogram,如果可以使用的话,应该如何去用?

问题二
  想在COPY完ASP程序后直接实现IIS的设置,也就是通过安装程序就可以完成,不需要手动设置,请问怎样去实现呢?

以下就是我用Project Wizard-generated script 做好的两个Fuction,他们不用调用也不用声明定义就自动执行,真是搞不懂呀!我的Script该加在什么地方呢?
// Include header files
    
#include "ifx.h"
function OnFirstUIBefore()
    number  nResult,nSetupType;
    string  szTitle, szMsg;
    string  szLicenseFile, szQuestion;
    string  szName, szCompany, szSerial;
    string  szTargetPath;
    string  szDir;
    string  szComponents, szTargetdir;
    number  nLevel;
    LIST    listStartCopy;
    number  nvSize;
begin
    nSetupType = TYPICAL;
    TARGETDIR = "C:"^"inetpub" ^"wwwroot" ^@PRODUCT_NAME;
    szDir = TARGETDIR;
    szName    = "";
    szCompany = "";
    szSerial = "";

Dlg_Start:
    // beginning of dialogs label

Dlg_SdWelcome:
    szTitle = "";
    szMsg  = "";
    nResult = SdWelcome( szTitle, szMsg );
    if (nResult = BACK) goto Dlg_Start;

Dlg_SdLicense:
    szLicenseFile = SUPPORTDIR ^ "license.txt";
    szTitle    = "";
    szMsg      = "";
    szQuestion = "";
    nResult    = SdLicense( szTitle, szMsg, szQuestion, szLicenseFile );
    if (nResult = BACK) goto Dlg_SdWelcome;

Dlg_SdRegisterUserEx:
    szMsg  = "";
    szTitle = "";
    nResult = SdRegisterUserEx( szTitle, szMsg, szName, szCompany, szSerial );
    if (nResult = BACK) goto Dlg_SdLicense;

Dlg_SdAskDestPath:
    szTitle = "";
    szMsg  = "please select setup folder";
    nResult = SdAskDestPath( szTitle, szMsg, szDir, 0 );
    TARGETDIR = szDir;  
    if (nResult = BACK) goto Dlg_SdRegisterUserEx;

Dlg_SetupType:  
    szTitle    = "";
    szMsg      = "";
    nResult = SetupType ( szTitle , szMsg , "" , nSetupType , 0 );
    if (nResult = BACK) then
        goto Dlg_SdAskDestPath;
    else
        nSetupType = nResult;
        if (nSetupType != CUSTOM) then
      szTargetPath = TARGETDIR;
      nvSize = 0;
      ComponentCompareSizeRequired(MEDIA,szTargetPath,nvSize);
      if (nvSize != 0) then      
              MessageBox( szSdStr_NotEnoughSpace, WARNING );
          goto Dlg_SetupType;
            endif;
        endif;  
    endif;

Dlg_SdComponentTree:
    if ((nResult = BACK) && (nSetupType != CUSTOM)) goto Dlg_SetupType;
    szTitle    = "";
    szMsg      = "";
    szTargetdir = TARGETDIR;
    szComponents = "";
    nLevel = 2;
    if (nSetupType = CUSTOM) then
    nResult = SdComponentTree(szTitle, szMsg, szTargetdir, szComponents, nLevel);
    if (nResult = BACK) goto Dlg_SetupType;  
    endif;

Dlg_ObjDialogs:
    nResult = ShowObjWizardPages(nResult);
    if (nResult = BACK) goto Dlg_SdComponentTree;
    
Dlg_SdStartCopy:
    szTitle = "";
    szMsg  = "";
    listStartCopy = ListCreate( STRINGLIST );
    nResult = SdStartCopy( szTitle, szMsg, listStartCopy );
    ListDestroy(listStartCopy);      
    if (nResult = BACK) goto Dlg_ObjDialogs;

    // setup default status
    SetStatusWindow(0, "");
    Enable(STATUSEX);
    StatusUpdate(ON, 100);
    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
    szAppPath = TARGETDIR;
    RegDBSetItem(REGDB_APPPATH, szAppPath);
    RegDBSetItem(REGDB_APPPATH_DEFAULT, szAppPath ^ @PRODUCT_KEY);
end;
// --- include script file section ---


视频教程列表
文章教程搜索
 
Asp推荐教程
Asp热门教程
看全部视频教程
购买方式/价格
购买视频教程: 咨询客服
tel:15972130058