| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 971 人关注过本帖
标题:[求助]求救:那位对Installshield比较熟悉,用这个打包asp和数据库程序
只看楼主 加入收藏
jclhy
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2004-12-27
收藏
 问题点数:0 回复次数:2 
[求助]求救:那位对Installshield比较熟悉,用这个打包asp和数据库程序

求救:那位对Installshield比较熟悉,用这个打包asp和数据库程序!

我现在用Installshield打包对于数据库打不进去!

我是用的是Installshield X版本!

//=========================================================================== // // File Name: Setup.rul // // Description: Blank setup main script file // // Comments: Blank setup is an empty setup project. If you want to // create a new project via. step-by step instructions use the // Project Assistant. // //===========================================================================

// Included header files ---------------------------------------------------- #include "ifx.h" string szServer,svUser,svPassword; NUMBER nvFileHandle; //prototype CreateDblink (STRING,STRING,STRING);

//--------------------------------------------------------------------------- // OnFirstUIBefore // // First Install UI Sequence - Before Move Data // // The OnFirstUIBefore event is called by OnShowUI when the setup is // running in first install mode. By default this event displays UI allowing // the end user to specify installation parameters. // // Note: This event will not be called automatically in a // program...endprogram style setup. //--------------------------------------------------------------------------- function OnFirstUIBefore() number nResult, nLevel, nSize, nSetupType; string szTitle, szMsg, szOpt1, szOpt2, szLicenseFile; string szName, szCompany, szTargetPath, szDir, szFeatures, szTargetdir; BOOL bLicenseAccepted; begin nSetupType = COMPLETE; szDir = TARGETDIR; szName = ""; szCompany = ""; bLicenseAccepted = FALSE;

// Beginning of UI Sequence Dlg_Start: nResult = 0;

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

Dlg_SdLicense2: szTitle = ""; szOpt1 = ""; szOpt2 = ""; //{{IS_SCRIPT_TAG(License_File_Path) szLicenseFile = SUPPORTDIR ^ "License.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_SdRegisterUser: szMsg = ""; szTitle = ""; //{{IS_SCRIPT_TAG(Dlg_SdRegisterUser) nResult = SdRegisterUser( szTitle, szMsg, szName, szCompany ); //}}IS_SCRIPT_TAG(Dlg_SdRegisterUser) if (nResult = BACK) goto Dlg_SdLicense2;

Dlg_SetupType2: szTitle = ""; szMsg = ""; //{{IS_SCRIPT_TAG(Dlg_SetupType2) nResult = SetupType2( szTitle, szMsg, "", nSetupType, 0 ); //}}IS_SCRIPT_TAG(Dlg_SetupType2) if (nResult = BACK) then goto Dlg_SdRegisterUser; else nSetupType = nResult; if (nSetupType != CUSTOM) then szTargetPath = TARGETDIR; nSize = 0; FeatureCompareSizeRequired( MEDIA, szTargetPath, nSize ); if (nSize != 0) then MessageBox( szSdStr_NotEnoughSpace, WARNING ); goto Dlg_SetupType2; endif; endif; endif;

Dlg_SdAskDestPath2: if ((nResult = BACK) && (nSetupType != CUSTOM)) goto Dlg_SetupType2; szTitle = ""; szMsg = ""; if (nSetupType = CUSTOM) then //{{IS_SCRIPT_TAG(Dlg_SdAskDestPath2) nResult = SdAskDestPath2( szTitle, szMsg, szDir ); //}}IS_SCRIPT_TAG(Dlg_SdAskDestPath2) TARGETDIR = szDir; endif; if (nResult = BACK) goto Dlg_SetupType2;

Dlg_SdFeatureTree: if ((nResult = BACK) && (nSetupType != CUSTOM)) goto Dlg_SdAskDestPath2; szTitle = ""; szMsg = ""; szTargetdir = TARGETDIR; szFeatures = ""; nLevel = 2; if (nSetupType = CUSTOM) then //{{IS_SCRIPT_TAG(Dlg_SdFeatureTree) nResult = SdFeatureTree( szTitle, szMsg, szTargetdir, szFeatures, nLevel ); //}}IS_SCRIPT_TAG(Dlg_SdFeatureTree) if (nResult = BACK) goto Dlg_SdAskDestPath2; endif;

Dlg_SQLServer:

nResult = OnSQLServerInitialize( nResult );

if( nResult = BACK ) goto Dlg_SdFeatureTree;

Dlg_ObjDialogs: nResult = ShowObjWizardPages( nResult ); if (nResult = BACK) goto Dlg_SQLServer; Dlg_SdStartCopy2: szTitle = ""; szMsg = ""; //{{IS_SCRIPT_TAG(Dlg_SdStartCopy2) nResult = SdStartCopy2( szTitle, szMsg ); //}}IS_SCRIPT_TAG(Dlg_SdStartCopy2) if (nResult = BACK) goto Dlg_ObjDialogs;

return 0; end; ////////////////////////////////////////////////////////////////////////////// // // 函数: 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. // /////////////////////////////////////////////////////////////////////////////// function OnFirstUIAfter() NUMBER bOpt1, bOpt2; STRING szTitle,szMsg1, szMsg2, szOption1, szOption2; begin OpenFileMode(FILE_MODE_APPEND); OpenFile(nvFileHandle,TARGETDIR^"\\Connections\\","cnEbooks.asp"); WriteLine(nvFileHandle,"MM_cnEbooks_STRING = \"dsn=ebook;uid="+IS_SQLSERVER_USERNAME+";pwd="+IS_SQLSERVER_PASSWORD+"\" "); WriteLine(nvFileHandle,"%>"); CloseFile(nvFileHandle);

bOpt1 = FALSE; bOpt2 = FALSE; szMsg1 = SdLoadString(IFX_SDFINISH_MSG1); szMsg2 = "数字图书馆服务器端已经安装完成!客户端请使用http://IP/ebook登陆进行访问"; szOption1 = ""; szOption2 = ""; szTitle = "数字图书馆安装完成"; SdFinishEx(szTitle,szMsg1,szMsg2,szOption1,szOption2,bOpt1,bOpt2);

return 0; end; ////////////////////////// // 创建数据库连接参数///// //////////////////////////

//function CreateDblink (szServer,svUser,svPassword) //NUMBER nvFileHandle; //begin // OpenFileMode(FILE_MODE_APPEND); // OpenFile(nvFileHandle,TARGETDIR^"\\Connections\\","cnEbooks.asp"); // WriteLine(nvFileHandle,"MM_cnEbooks_STRING = \"dsn=ebook;uid="+svUser+";pwd="+svPassword+"\" "); // WriteLine(nvFileHandle,"%>"); // CloseFile(nvFileHandle); // return 0; //end;

上面是俺的脚本!问题就出在svUser、svPassword这两个变量不能从

Dlg_SQLServer:

nResult = OnSQLServerInitialize( nResult );

if( nResult = BACK ) goto Dlg_SdFeatureTree;

返回任何值!求大侠们帮帮忙吧!我是半瓶子所以有些地方实在不明白!

[此贴子已经被作者于2004-12-27 17:05:10编辑过]

搜索更多相关主题的帖子: 数据库 asp setup 打包 
2004-12-27 16:59
jclhy
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2004-12-27
收藏
得分:0 
怎么没有人回复阿!
2004-12-28 09:09
jclhy
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2004-12-27
收藏
得分:0 
嗬嗬,没办法,那有没有别的办法帮帮我!
2004-12-29 14:02
快速回复:[求助]求救:那位对Installshield比较熟悉,用这个打包asp和数据库程序 ...
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015925 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved