用InstallShield 进行 ASP 软件的打包和自动安装,用InstallShield 进行 ASP 软件的打包和自动安装
【 tulaoshi.com - ASP 】
#include "ifx.h" //不能移动//////////////////////////////////////////////////////////////////////////////
//
// 函数: 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
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;
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
看过《用InstallShield 进行 ASP 软件的打包和自动安装》的人还看了以下文章 更多>>