//---------------------------------------------------------------- //´Ë´¦ÎªµÚ¶þ´ÎÊÇжÔØ
svResult = SdLoadString(IFX_MAINTUI_MSG); szCaption = SdLoadString(IFX_ONMAINTUI_CAPTION); svResult=\ÊÇ·ñÒªÍêȫжÔØ¡°ÍøÉÏÔľíϵͳ¡±£¿\
szCaption=\È·ÈÏжÔØ\
nResult = SprintfBox(MB_OKCANCEL,szCaption,\ if (nResult = IDCANCEL) then exit;
elseif(nResult = IDOK) then // setup default status SetStatusWindow(0, \ Enable(STATUSEX);
StatusUpdate(ON, 100); //-->Remove all components ComponentRemoveAll();
//------------------------------------------------------------------------------------------- //·ÖÀëÊý¾Ý¿âEXEC sp_detach_db @dbname = 'Êý¾Ý¿âÃû³Æ' //Server=[IS_SQLSERVER_SERVER];User
id=[IS_SQLSERVER_USERNAME];Pwd=[IS_SQLSERVER_PASSWORD];DataBase=wxd;Max Size=200;Connect Timeout=300;Connection Lifetime=3;
//DetachDB();
//-----------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------- DeleteDir(TARGETDIR,ALLCONTENTS); DeleteDir(TARGETDIR,ONLYDIR);
//--------------------------------------------------------------------- endif;
return 0;
//------------------------------------------------------------
// Added in Version 9.5 - Support for REMOVEONLY option. //ÐÂÔöµÄ°æ±¾9.5 - ΪREMOVEONLYÑ¡ÔñÖ§³Ö if( !REMOVEONLY ) then
// In standard mode show maintenance dialog //ÔÚ±ê׼ģʽ¶Ô»°¿òÏÔʾάÐÞ
Disable(BACKBUTTON);
nType = SdWelcomeMaint(szTitle, szMsg, MODIFY); Enable(BACKBUTTON); else
// Hide the initial progress dialog as otherwise the user can
Pool
// click on it, and hide the MessageBox.
//Òþ²Ø£¬·ñÔòÓû§µÄ¶Ô»°£¬¿ÉÒÔ³õ²½½øÕ¹µã»÷Ëü£¬²¢Òþ²ØÔÚMessageBox¡£ Disable( DIALOGCACHE );
// In RemoveOnly mode, set to remove. //ÔÚRemoveOnlyģʽ£¬ÉèÖÃɾ³ý nType = REMOVEALL; endif;
// Show Uninstall Confirmation Dialog //ÏÔʾжÔØÈ·È϶Ի°¿ò if ( nType = REMOVEALL ) then
nResult = MessageBox( SdLoadString( IFX_MAINTUI_MSG ), MB_YESNO ); if (nResult != IDYES ) then
if( REMOVEONLY ) then
// In REMOVEONLY mode, abort the setup. //ÏÔʾжÔØÈ·È϶Ի°¿ò abort;
else
// In non-REMOVEONLY mode, redisplay the previous dialog. //ÔÚ·ÇREMOVEONLYģʽ£¬ÖØÐÂÏÔʾÒÔÇ°µÄ¶Ô»°¡£ goto Dlg_Start; endif;
endif; endif;
nResult = NEXT;
Dlg_SdFeatureTree:
if (nType = MODIFY) then szTitle = \ szMsg = \
nResult = SdFeatureTree(szTitle, szMsg, INSTALLDIR, \ if (nResult = BACK) goto Dlg_Start; endif;
switch(nType)
case REMOVEALL: FeatureRemoveAll(); case REPAIR: FeatureReinstall(); endswitch;
// setup default status
//ÉèÖÃĬÈÏ״̬ SetStatusWindow(0, \ Enable(STATUSEX);
StatusUpdate(ON, 100); end;
//--------------------------------------------------------------------------- // OnUninstall
//
// The OnUninstall event is called when the setup is run with the -uninst // switch, in this case this is the only event that will be called.
//¸ÃOnUninstall»î¶¯ÃûΪ°²×°³ÌÐòʱ£¬Ê¹ÓÃ- uninstÔËÐпª¹Ø£¬ÔÚÕâÖÖÇé¿öÏ£¬ÕâÊÇΨһµÄʼþ£¬½«±»µ÷Óá£
//--------------------------------------------------------------------------- function OnUninstall()
BOOL bvOpt1, bvOpt2;
string szTitle, szMsg1, szMsg2, szOpt1, szOpt2, svResult, szCaption;
begin //±êÌâÉèÖÃ
SetTitle(\»¶ÓÄúʹÓÃÒøºÓ¿¨µç×Ó²úÆ·\ 24, WHITE);
//-------------------------------------------------------
// ÔÚ×ÀÃæÉÏɾ³ý¿ì½Ý·½Ê½
DeleteFolderIcon (FOLDER_DESKTOP, TARGETDIR+\ //ɾ³ý³ÌÐòÖеĿì½Ý·½Ê½
DeleteFolderIcon(FOLDER_PROGRAMS^\ÍøÉÏÔľíϵͳGF\ //------------------
svResult = SdLoadString(ISWI_IS5_UNINST_MSG); szCaption = SdLoadString(IFX_ONMAINTUI_CAPTION); Sprintf (svResult, svResult, @PRODUCT_NAME);
if (IDCANCEL = SprintfBox(MB_OKCANCEL, szCaption, svResult)) then abort; endif;
Enable(STATUSEX);
////////////////////////////////////// //DO NOT DELETE. The below code will //initiate the uninstallation process. ComponentRemoveAll();
ComponentTransferData(MEDIA); //////////////////////////////////////
Disable(STATUSEX);
°²×°
bvOpt1 = FALSE; bvOpt2 = FALSE;
szMsg1 = SdLoadString(IFX_SDFINISH_MAINT_MSG1); szTitle = SdLoadString(IFX_SDFINISH_MAINT_TITLE);
SdFinishEx(szTitle, szMsg1, szMsg2, szOpt1, szOpt2, bvOpt1, bvOpt2); //ɾ³ý°²×°Îļþ
DeleteDir(ProgramFilesFolder+\
Information\\\\{E71A5501-0CCF-4765-A743-8F1352781170}\ DeleteDir(ProgramFilesFolder+\
Information\\\\{E71A5501-0CCF-4765-A743-8F1352781170}\ end;
/////////////////////////////////////////////////////////////////////// prototype AttachDB(STRING,STRING,STRING);
function number AttachDB(svSQLsvr,svSQLusr,svSQLpwd) STRING szCmdLine,szWaitTxt;
begin
szWaitTxt=\ÕýÔÚ¸½¼ÓËùÐèÊý¾Ý¿â??\
SdShowMsg (szWaitTxt, TRUE); Delay(2);
if(bWinLogin) then
szCmdLine = \/E /S \/Q \\\ sp_attach_db @dbname = N'YCSCMDB',@filename1 = N'\ʾÀýÊý¾Ý¿â\\\\YCSCMDB_Data.MDF',@filename2 = N'\ʾÀýÊý¾Ý¿â\\\\YCSCMDB_Log.LDF'\\\
WriteDBInfo(\ /S \ else
szCmdLine = \ sp_attach_db @dbname = N'YCSCMDB',@filename1 = N'\ʾÀýÊý¾Ý¿â\\\\YCSCMDB_Data.MDF',@filename2 N'\ʾÀýÊý¾Ý¿â\\\\YCSCMDB_Log.LDF'\\\ WriteDBInfo(\ endif;
//szCmdLine = \\/P \/S \/Q \\\ sp_attach_db @dbname = N'dlbj',@filename1 = N'\^\ = N'\
if (LaunchAppAndWait(\
MessageBox (\Êý¾Ý¿â¸½¼Óʧ°Ü£¡Êý¾Ý¿âÎļþÒÑ°²×°µ½±¾µØĿ¼£¬ÇëÊÖ¶¯¸½¼Ó£¡\ endif;
SdShowMsg (szWaitTxt, FALSE);
=
Installation Installation
//szWaitTxt=\ÕýÔÚÓÅ»¯ÏµÍ³Êý¾Ý¿â??\
//SdShowMsg (szWaitTxt, TRUE); //Delay(2);
//szCmdLine = \\/P \/S \/Q \\\dlbj ; exec sp_updatestats\\\
// if (LaunchAppAndWait(\
// MessageBox (\Êý¾Ý¿âÓÅ»¯Ê§°Ü£¡Äú¿ÉÒÔÔÚ sql²éѯ·ÖÎöÆ÷ÖÐÖ´ÐÐ use dlbj ; exec sp_updatestats Íê³É£¡\ // endif;
// SdShowMsg (szWaitTxt, FALSE);
return 0;
end;
//--------------------------------------------------------------------------- // OnEnd
//
// The OnEnd event is called at the end of the setup. This event is not // called if the setup is aborted.
//--------------------------------------------------------------------------- function OnEnd()
begin
end;
//--------------------------------------------------------------------------- // OnAppSearch //
// The OnAppSearch event is called after OnBegin and can be used to search // for previous versions of the current application. This event is called // only when the setup is running in first install mode. //--------------------------------------------------------------------------- function OnAppSearch() begin end;
//--------------------------------------------------------------------------- // OnBegin //
// The OnBegin event is called directly by the framework after the setup // initializes.
//--------------------------------------------------------------------------- function OnBegin()
begin
// TO DO: you may change default non-UI setting, for example //