InstallShield 打包实例 - 图文 下载本文

内容发布更新时间 : 2024/5/20 12:02:19星期一 下面是文章的全部内容请认真阅读。

CloseFile(nvFileHandle);

else

nvIp=StrFind(svLine,\本地连接:\ if(nvIp>-1)then cd:

if(GetLine( nvFileHandle,svLine)<0) then CloseFile(nvFileHandle);

else

nvIp=StrFind (svLine,\ if(nvIp>-1)then StrSub

(svSubStr,

svLine,nvIp+StrLength(\

Address. . . . . . . . . . . . : \ szIp=svSubStr; else

goto cd; endif; endif; else

goto ab; endif; endif;

//-------------------------------------------------------------------------------------- SetIIS:

//安装iis

//szProgram = \

//szCmdLine = \ if CheckIIS() then

goto SetDotNet; else

SprintfBox(MB_OK,\安装\您还未安装IIS,请安装!\ if(LaunchAppAndWait(\WAIT)<0)then

\

appwiz.cpl,,2\

SprintfBox(MB_OK,\安装\安装时发生意外,请重新安装!\ else goto SetIIS; endif; endif;

//--------------------------------------------------------------------------- SetDotNet:

//判断是否安装了.netframework

RegDBSetDefaultRoot ( HKEY_LOCAL_MACHINE );

if ( RegDBKeyExist (\

SprintfBox(MB_OK,\安装\尚未安装.net framework 2.0 !\\n请点击“确定”以继续安装!\

if( LaunchAppAndWait( SUPPORTDIR ^ \ SprintfBox(MB_OK,\安装\安装.net框架时发生意外,请重新安装!\ else

SprintfBox(MB_OK,\安装\已安装!\ endif;

endif;

//---------------------------------------------------------------------- SetSqlServer:

//判断是否安装了SQL Server

RegDBSetDefaultRoot ( HKEY_LOCAL_MACHINE ); if

(

RegDBSetKeyValueEx

(\

SQL

Server\\\\80\\\\MSSQLLicenseInfo\\\\MSSQL8.00\\\\DisplayName\L Server 2000\

SprintfBox(MB_OK,\安装\尚未安装SQL Server 2000 !\\n请点击“确定”以继续安装!\

if( LaunchAppAndWait( SUPPORTDIR ^ \< 0) then

SprintfBox(MB_OK,\Server 2000 安装\安装SQL Server 2000 时发生意外,请重新安装!\

else

SprintfBox(MB_OK,\安装\已安装!\ endif; endif;

//------------------------------------------------------------------

Dlg_SdWelcome: //欢迎 对话框 szTitle = \欢迎使用YHK_GF安装软件\

szMsg = \安装软件将在您的计算机中安装\\b\\n\\b\\n“网上阅卷系统”,\\b\\n\\b\\n若要继续,请单击“下一步”。\

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

Dlg_SdLicense2: //软件许可协议

szTitle =\欢迎您\\b\\n请仔细阅读用户协议,本协议具有法律效力!!\ szOpt1 = \同意(&A)\ szOpt2 = \不同意(&D)\

//{{IS_SCRIPT_TAG(License_File_Path)

szLicenseFile = SUPPORTDIR ^ \用户使用协议.rtf\ //}}IS_SCRIPT_TAG(License_File_Path)

//{{IS_SCRIPT_TAG(Dlg_SdLicense2)

nResult = SdLicense2Rtf( szTitle, szOpt1, szOpt2, szLicenseFile, bLicenseAccepted ); //}}IS_SCRIPT_TAG(Dlg_SdLicense2) if (nResult = BACK) then goto Dlg_SdWelcome;

else

bLicenseAccepted = TRUE; endif;

Dlg_SdCustomerInformation: //用户信息对话框

szMsg = \请您填写用户信息卡\

szTitle = \欢迎您\\b\\n使用YHK安装系统\ svName = \ svCompany = \

nResult = SdCustomerInformation(szTitle, svName, svCompany, nUser); if (nResult = BACK) goto Dlg_SdWelcome;

Dlg_SetupType: //安装类型对话框

szTitle = \安装类型\\b\\n请选择安装类型\ szMsg = \请选择安装\

nResult = SetupType(szTitle, szMsg, \ if (nResult = BACK) then

goto Dlg_SdCustomerInformation; else

nSetupType = nResult;

if (nSetupType != CUSTOM) then nvSize = 0;

FeatureCompareSizeRequired(MEDIA, INSTALLDIR, nvSize); if (nvSize != 0) then

MessageBox(szSdStr_NotEnoughSpace, WARNING); goto Dlg_SetupType; endif;

bCustom = FALSE; goto Dlg_SQL; else

bCustom = TRUE; endif; endif;

Dlg_SdAskDestPath: szTitle=\

szMsg=\

nResult = SdAskDestPath(szTitle, szMsg, INSTALLDIR, 0); if (nResult = BACK) goto Dlg_SetupType;

Dlg_SdFeatureTree:

szTitle = \

szMsg = \

if (nSetupType = CUSTOM) then

nResult = SdFeatureTree(szTitle, szMsg, INSTALLDIR, \ if (nResult = BACK) goto Dlg_SdAskDestPath; endif;

Dlg_SQL:

nResult = OnSQLLogin( nResult ); if( nResult = BACK ) then if (!bCustom) then

goto Dlg_SetupType; else

goto Dlg_SdFeatureTree; endif; endif;

Dlg_SdStartCopy: //准备就绪对话框

szTitle = \可以安装“网上阅卷系统”了\\b\\n安装准备工作已就绪,可以开始安装了。\ szMsg =\单击“安装”以开始安装。\\b\\n如果要检查或更改任何安装设置,请单击“上一步”。单击“取消”退出安装向导。\

listStartCopy = ListCreate( STRINGLIST );

//The following is an example of how to add a string(svName) to a list(listStartCopy). //eg. ListAddString(listStartCopy,svName,AFTER); ListAddString(listStartCopy,\你的选择如下:\ ListAddString(listStartCopy,\

ListAddString(listStartCopy,\安装路径:\ ListAddString(listStartCopy,\

ListAddString(listStartCopy,\程序组名:\ ListAddString(listStartCopy,\ if (nSetupType = CUSTOM) then

ListAddString(listStartCopy,\安装类型:\自定义\ elseif (nSetupType = TYPICAL) then

ListAddString(listStartCopy,\安装类型:\典型\ elseif (nSetupType = COMPACT) then

ListAddString(listStartCopy,\安装类型:\压缩\ endif;

nResult = SdStartCopy( szTitle, szMsg, listStartCopy ); ListDestroy(listStartCopy); if (nResult = BACK) then

goto Dlg_SQL; endif;

//---------------------------------------------------------------------------------

// 在桌面上添加快捷方式

AddFolderIcon(FOLDER_DESKTOP,\网上阅卷系统首页\ACE);

//添加程序快捷方式

AddFolderIcon(FOLDER_PROGRAMS^\网上阅卷系统GF安装\网上阅卷系统首页\ACE);

//添加卸载快捷方式

AddFolderIcon(FOLDER_PROGRAMS^\网上阅卷系统\

Information\\\\{E71A5501-0CCF-4765-A743-8F1352781170}\\\\Setup.exe \\\ // \\InstallShield Information\\{96C6BC6D-1EAA-43C2-9A2C-CB1242590FD7}\\Setup.exe // 其中

// {611b4a59-fae0-443b-acbb-8cb1ce57fada} // 这个值是这样取得的

// Project-》Setting-》General-》Project对应的那项

//---------------------------------------------------------------------------------------------------------------

// setup default status Enable(STATUSEX);

return 0; end;

//--------------------------------------------------------------------------- // OnMaintUIAfter //

// The OnMaintUIAfter event called by the framework after the file transfer // of the setup when the setup is running in maintenance mode. By default // this event displays UI that informs the end user that the maintenance setup // has been completed successfully.

//事件的OnMaintUIAfter所呼吁的框架后,文件传输在安装时,安装程序在维护模式下运行。 //默认情况下 这一事件显示界面,通知最终用户,维修安装 已成功完成。... //--------------------------------------------------------------------------- function OnMaintUIAfter()

STRING szTitle, szMsg1, szMsg2, szOption1, szOption2; NUMBER bOpt1, bOpt2; begin

Disable(STATUSEX);

Installation

GF

安装\卸载

Installation