用InstallShield 进行 ASP 软件的打包和自动安装

2016-01-29 20:18 43 1 收藏

用InstallShield 进行 ASP 软件的打包和自动安装,用InstallShield 进行 ASP 软件的打包和自动安装

【 tulaoshi.com - ASP 】

#include "ifx.h" //不能移动
//////////////////////////////////////////////////////////////////////////////
// 用InstallShield 进行 ASP 软件的打包和自动安装
// 原创作者: 贾俊 (Jaron)
// 网址: http://www.jiangdu.net
// 邮件: jaron@jdinfo.net
// 首次发表于网易,ChinaASP,ASPHouse
//////////////////////////////////////////////////////////////////////////////
// 功能:
// 1.文件复制
// 2.可选自动设置独立站点运行(设置IIS)
// 3.可选自动设置虚拟站点运行(设置IIS)
// 4.设置目录可读,可写及可运行脚本
// 5.自动创建ODBC
// 6.自动创建或附加MDF格式的SQL数据库 并优化
// 7.自动安装 ScriptEncode 解码程序
// 本文仅列出了 InstallShield 的 Script 部分,还有两个 VBS 文件及其他设置
// 测试过程中有任何问题,请来 http://www.jiangdu.net/bbs 编程空间版 讨论
//////////////////////////////////////////////////////////////////////////////
prototype CreateDataBase(STRING,STRING,STRING);
prototype CreateWebSite(STRING,STRING); // 创建 IIS 站点
prototype CreateVirtualDir(STRING); // 创建虚拟目录

//////////////////////////////////////////////////////////////////////////////
//
// 函数: 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.
//
///////////////////////////////////////////////////////////////////////////////
function OnFirstUIBefore()
NUMBER nResult,nSetupType,nOpt,svEdit1,svEdit2;
STRING szTitle, szMsg,szBmpPath;
STRING szLicenseFile, szQuestion;
STRING szServerIP,szServerPort,szServerIPDefault,szServerPortDefault;
STRING szSQLsvr,szSQLusr,szSQLpwd,svSQLsvr,svSQLusr,svSQLpwd;
STRING svName, svCompany, svSerial;
STRING szFile,szTargetPath,szDir,szfolder;
STRING szComponents, szTargetdir;
STRING szField1,szField2;
STRING szDefault,svResult;
OBJECT piisObj;
LIST list,listStartCopy;
NUMBER nLevel,nvSize;
begin

(本文来源于图老师网站,更多请访问http://www.tulaoshi.com/asp/)

szBmpPath="C:"^"temp"^"left.bmp";
DialogSetInfo (DLG_INFO_ALTIMAGE, szBmpPath, TRUE); // 设置左边的图片
//To Do: if you want to enable background, window title, and caption bar title
//SetTitle( @TITLE_MAIN, 24, WHITE );
//SetTitle( @TITLE_CAPTIONBAR, 0, BACKGROUNDCAPTION );
//Enable( FULLWINDOWMODE );
//Enable( BACKGROUND );
//SetColor(BACKGROUND,RGB (0, 128, 128));

//默认值设定
TARGETDIR = "C:"^"inetpub"^"JaronSoft"^@FOLDER_NAME;
szDir = TARGETDIR;
SHELL_OBJECT_FOLDER = @FOLDER_NAME;
svName = "试用版用户";
svCompany = "JDinfo Network";
svSerial = "111-1111111";

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;

(本文来源于图老师网站,更多请访问http://www.tulaoshi.com/asp/)

Dlg_SdShowInfoList://readme文件 对话框
szFile = SUPPORTDIR ^ "infolist.txt";
list = ListCreate( STRINGLIST );
ListReadFromFile( list, szFile );
szTitle = "README";
szMsg = "";
nResult = SdShowInfoList( szTitle, szMsg, list );
ListDestroy( list );
if (nResult = BACK) goto Dlg_SdLicense;

Dlg_SdRegisterUserEx://用户信息 对话框
szMsg = "";
szTitle = "用户信息";
nResult = SdRegisterUserEx( szTitle, szMsg, svName, svCompany, svSerial );
if (nResult = BACK) goto Dlg_SdShowInfoList;
//检查序列号
//if (CHK_serial(svCompany, svSerial)<0) then
//goto Dlg_SdRegisterUserEx;
//endif;
//检查序列号完毕
Dlg_SdAskDestPath://安装位置 对话框
szTitle = "检查序列号";
szMsg = "";
nResult = SdAskDestPath( szTitle, szMsg, szDir, 0 );
TARGETDIR = szDir;
if (nResult = BACK) goto Dlg_SdRegisterUserE

来源:http://www.tulaoshi.com/n/20160129/1510978.html

延伸阅读
标签: ASP
////////////////////////////////////////////////////////////////////////////// // // 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 use...
标签: ASP
我现在在做ASP的安装程序,这样可以方便用户的使用。我使用的InstallShield版本是InstallShield Professional—Standard Edition6.3。 我没有用过这个东东,问题如下: 问题一 通过Project Wizard-generated script 做好了COPY打包工作。可是6.3版本的好象不支持主体Program...Endprogram,因为我看COPY打包的Script脚本就是通过两个Fuction...
标签: ASP
下面是建立WEB文件和设置的例子需VBS文件(有虚拟目录设置,但没有权限设置). //////////////////////////////////////////////////////////////////////////////// // // IIIIIII SSSSSS // II SS InstallShield (R) // II SSSSSS (c) 1996-1999, InstallShield Software Corporation // II SS (c) 1990-1996, InstallShield Corporation ...
碗豆夹软件自动安装方法   碗豆夹2 官方下载之后直接打开,打开设置界面: 找到高级设置那一栏,勾选下载完成后自动安装: 相信大家看到了下面的提示:仅限root用户,所以可以将手机root之后就可以享受自动安装的权利了~
在VB6中自带的打包程序生成安装包后,安装在Win2k或WinXP中可能会错误提示为“path or file not found”的错误,这是因为系统中的环境变量设置中存在问题,解决办法为在“我的电脑”点击右键,选择〔属性〕,然后选择〔高级〕中的〔环境变量〕,修改用户变量的《TEMP》和《TMP》与系统变量的《TEMP》和《TMP》的一致。

经验教程

44

收藏

73
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部