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

ComponentRemoveAll


3 replies to this topic

Nicie

Nicie
  • Members
  • 13 posts

Posted 20 August 2001 - 12:12

Hat jemand eine Ahnung, woran es liegen kann, daß beim Deinstallieren die Einträge im Startmenü nicht verschwinden?

Sie wurden in dieser Form dort eingetragen:

svPath = TARGETDIR^"Program"^@PRODUCT_KEY;
szIniPath =  TARGETDIR^"Program\\DD40.ini";
szIconPath = TARGETDIR^"Program\\DCC.ico";

LongPathToQuote ( svPath , TRUE );
LongPathToQuote ( szIniPath , TRUE );

AddFolderIcon ( @COMPANY_NAME , @PRODUCT_NAME + " " + @PRODUCT_VERSION , svPath + " " + szIniPath , TARGETDIR^"Program" , szIconPath , 0 ,""  , REPLACE);

Ich verwende zum Löschen die Funktion ComponentRemoveAll(). Die sollte das ja eigentlich alles erledigen.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 20 August 2001 - 17:57

Wo (in welchem Event-Hanlder) rufst Du AddFolderIcon auf? Hast Du sichergestellt, dass diser teil des Scripts bei der Deinstallation nicht ausgeführt wird?

Nicie

Nicie
  • Members
  • 13 posts

Posted 21 August 2001 - 08:49

Ich rufe AddFolderIcon() nur in der Funktion OnFirstUIAfter() auf, sonst nirgends.
ComponentRemoveAll() wird dann in OnMaintUIBefore() aufgerufen.

Dies sind die Events, die beim Deinstallieren aufgerufen werden:

---------------------------------------------------------
function OnMaintUIBefore()
STRING svResult,szCaption;
NUMBER nResult;
begin
   //Maintenance Modus
   svResult = SdLoadString(IFX_MAINTUI_MSG);
   szCaption = SdLoadString(IFX_ONMAINTUI_CAPTION);
   nResult = SprintfBox(MB_OKCANCEL,szCaption,"%s",svResult);
   if (nResult = IDCANCEL) then
       exit;
   elseif(nResult = IDOK) then
       // Standardwerte der Statusanzeige
       SetStatusWindow(0, "");
       Enable(STATUSEX);
       StatusUpdate(ON, 100);
       //-->Alle Komponenten entfernen
       ComponentRemoveAll();
   endif;
   return 0;
end;
---------------------------------------------------------
function OnMoving()
STRING szAppPath;
begin
   szAppPath = TARGETDIR;
   RegDBSetItem(REGDB_APPPATH, szAppPath);
   RegDBSetItem(REGDB_APPPATH_DEFAULT, szAppPath ^ @PRODUCT_KEY);
end;
---------------------------------------------------------
function OnMaintUIAfter()
   BOOL    bOpt;
   STRING  szMsg1;
begin
   // lösche alles was noch übriggeblieben ist (z.B. ini-Dateien)
   DeleteDir (TARGETDIR, ALLCONTENTS);        
   Disable(STATUSEX);
   Dlg_SdFinish:
   szMsg1 = @MSG_FINISH;
   SdFinish ("", szMsg1, "", "", "", bOpt, bOpt);
   return 0;
end;
---------------------------------------------------------

Hab ich vielleicht etwas vergessen oder übersehen?

(Edited by Nicie at 8:49 am on Aug. 21, 2001)


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 21 August 2001 - 17:26

Dann weiss ich auch nicht...
Man müsste mal das ganze Project durchschauen und debuggen.