没有合适的资源?快使用搜索试试~ 我知道了~
使用InstallShield制作ASP安装程序
需积分: 4 12 下载量 128 浏览量
2009-07-18
13:28:45
上传
评论
收藏 71KB DOC 举报
温馨提示
试读
22页
使用InstallShield制作ASP安装程序,这个资料在网上比较少,收集一下,放上来给大家分享。
资源推荐
资源详情
资源评论
使用 InstallShield 制作 ASP 安装程序
我现在在做 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 ---
6.3 版好象是用事件驱动的:
//////////////////////////////////////////////////////////////////////////////
//
// 函数: OnFirstUIBefore
//
// 事件: FirstUIBefore event is sent when installation is run for the first
// time on given machine. In the handler installation usually displays
// UI allowing end user to specify installation parameters. After this
// function returns, ComponentTransferData is called to perform file
// transfer.
//
///////////////////////////////////////////////////////////////////////////////
OnFirstUIBefore()是在某台电脑上第一次运行安装时执行.
//////////////////////////////////////////////////////////////////////////////
//
// 函数: OnFirstUIAfter
//
// 事件: 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.
//
///////////////////////////////////////////////////////////////////////////////
OnFirstUIAfter()在文件复制结束后运行.
下面是建立 Web 文件和设置的例子需 VBS 文件(有虚拟目录设置,但没有权限设置).
////////////////////////////////////////////////////////////////////////////////
//
// IIIIIII SSSSSS
// II SS InstallShield (R)
// II SSSSSS (c) 1996-1999, InstallShield Software Corporation
// II SS (c) 1990-1996, InstallShield Corporation
// IIIIIII SSSSSS All Rights Reserved.
//
//
// This code is generated as a starting setup template. You should
// modify it to provide all necessary steps for your setup.
//
//
// 文件名: Setup.rul
//
// 描述: InstallShield script
//
// 注释: This template script performs a basic setup. With minor
// modifications, this template can be adapted to create
// new, customized setups.
//
////////////////////////////////////////////////////////////////////////////////
// 包含的头文件
#include "ifx.h" //不能移动
////////////////////// string defines ////////////////////////////
//////////////////// installation declarations ///////////////////
// ----- DLL function prototypes -----
// your DLL function prototypes
// ---- script function prototypes -----
// your script function prototypes
prototype CHK_serial(STRING,STRING);
prototype RegODBC(STRING);
prototype set_vod_liveaddress();
// your global variables
STRING szvodservername;
STRING szliveservername;
//////////////////////////////////////////////////////////////////////////////
//
// 函数: OnFirstUIBefore
//
剩余21页未读,继续阅读
资源评论
zhanghao2418
- 粉丝: 0
- 资源: 11
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功