Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Add/Remove control panel's problem


1 reply to this topic

installshielduan

installshielduan
  • Members
  • 2 posts

Posted 06 April 2006 - 17:14

Hi,all.
I 'm the new on InstallShield 11.5 .
I met the following problem.
i called OnFirstUIBefore() ,OnMaintUIBefore() and OnMaintUIAfter() functions
in my installScript. And i found that if i didn't call OnMaintUIBefore(),
the Add/Remove control panel's perform is OK.If i called OnMaintUIBefore(),
the modify button will calls SdWelcomeMaint dialog. That's OK.But the remove button
also calls SdWelcomeMaint dialog. i don't know what's wrong with it....
Any ideas as to what I can do to make it run properly?
Thank u very much....

the source structure is....
function OnFirstUIBefore()
begin
......
end;

function OnMaintUIBefore()
begin
...
nType = SdWelcomeMaint(szTitle, szMsg, MODIFY);
...
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;


......
end;


spdygnlz

spdygnlz
  • Full Members
  • 106 posts

Posted 12 April 2006 - 16:36

Try the following:

CODE

   if( !REMOVEONLY ) then
    // In standard mode show maintenance dialog
    Disable( BACKBUTTON );
    nType = SdWelcomeMaint( szTitle, szMsg, nType );
    Enable( BACKBUTTON );
       nResult = NEXT;
   else
       // Hide the initial progress dialog as otherwise the user can
       // click on it, and hide the MessageBox.
       Disable( DIALOGCACHE );

       // In RemoveOnly mode, set to remove.
       nType = REMOVEALL;
   endif;


I think the part you're missing is checking REMOVEONLY

-- spdygnlz --