回复《谁用过InstallShield 8.0, 在线请教!!!!》没办法不能连续回复四次

征先科技 2003-08-22 02:39:23
// FUNCTION: OnMaintUIBefore
//
// EVENT: MaintUIBefore event is sent when end user runs installation that
// has already been installed on the machine. Usually this happens
// through Add/Remove Programs applet. In the handler, installation
// usually displays UI allowing end user to modify existing installation
// or uninstall application. After this function returns,
// FeatureTransferData is called to perform file transfer.
//
///////////////////////////////////////////////////////////////////////////////
function OnMaintUIBefore()
NUMBER nResult, nType;
STRING szTitle, szMsg, svDir, svResult, szCaption;
begin
// TO DO: if you want to enable background, window title, and caption bar title
// SetTitle( @PRODUCT_NAME, 24, WHITE );
// SetTitle( @PRODUCT_NAME, 0, BACKGROUNDCAPTION );
// SetColor(BACKGROUND,RGB (0, 128, 128));
// Enable( FULLWINDOWMODE );
// Enable( BACKGROUND );

Dlg_Start:
Disable(BACKBUTTON);
nType = SdWelcomeMaint(szTitle, szMsg, MODIFY);
Enable(BACKBUTTON);

if (nType = REMOVEALL) then
svResult = SdLoadString(IFX_MAINTUI_MSG);
szCaption = SdLoadString(IFX_ONMAINTUI_CAPTION);
nResult = SprintfBox(MB_OKCANCEL,szCaption,"%s",svResult);
if (nResult = IDCANCEL) goto Dlg_Start;
endif;

nResult = NEXT;

Dlg_SdFeatureTree:
if (nType = MODIFY) then
szTitle = "";
szMsg = "";
nResult = SdFeatureTree(szTitle, szMsg, INSTALLDIR, "", 2);
if (nResult = BACK) goto Dlg_Start;
endif;

switch(nType)
case REMOVEALL: FeatureRemoveAll();
case REPAIR: FeatureReinstall();
endswitch;

Enable(STATUSEX);

end;
///////////////////////////////////////////////////////////////
///////////////////////创建数据库//////////////////////////////
///////////////////////////////////////////////////////////////
function CreateDataBase(svSQLsvr,svSQLusr,svSQLpwd)
STRING szCmdLine,szWaitTxt;
begin
szWaitTxt=" 正在创建"+@PRODUCT_NAME+"所需数据库....";
SdShowMsg (szWaitTxt, TRUE);
Delay(2);
szCmdLine = "/U "+svSQLusr+" /P "+svSQLpwd+" /S "+svSQLsvr+" /Q \"exec sp_attach_db N'dawnhistest' , N'"+ INSTALLDIR ^"data\\dawnhis.mdf'\"";
if (LaunchAppAndWait("osql.exe", szCmdLine,WAIT) < 0) then
MessageBox ("数据库创建失败!请确您的系统中已安装 Microsoft SQL Server 2000.\n如仍无法解决,请联系系统供应商!",SEVERE);
else


endif;
SdShowMsg (szWaitTxt, FALSE);
szWaitTxt=" 正在优化"+@PRODUCT_NAME+"系统数据库....";
SdShowMsg (szWaitTxt, TRUE);
Delay(2);
szCmdLine = "/U "+svSQLusr+" /P "+svSQLpwd+" /S "+svSQLsvr+" /Q \"use OASystem ; exec sp_updatestats\"";
if (LaunchAppAndWait("osql.exe", szCmdLine,WAIT) < 0) then
MessageBox ("数据库优化失败!您可以在 sql查询分析器中执行 \n use OASystem ; exec sp_updatestats \n完成!",SEVERE);
endif;
SdShowMsg (szWaitTxt, FALSE);
return 0;
end;
...全文
37 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
MFCboy 2003-08-22
  • 打赏
  • 举报
回复
岛主, 太感谢了!!!!!!!!!!!!
征先科技 2003-08-22
  • 打赏
  • 举报
回复
up
征先科技 2003-08-22
  • 打赏
  • 举报
回复
有一部分冗余代码请自行修改

1,978

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 其他语言讨论
社区管理员
  • 其他语言社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧