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

Cancelling Uninstalled


2 replies to this topic

Jemoo

Jemoo
  • Members
  • 9 posts

Posted 13 May 2002 - 03:09

Morning all,  :)

i have succefully made a.exe installation.
and i did the following steps
1) First, install a.exe installation
2) Succesfully installed a.exe
3) Then i try to unistall a.exe
4) while uninstalling i click cancel button - 41% unistallation
5) it pops message saying whether you want to cancel or not i choose "yes"

it should not do any unsintallation at all. But, seems to me there are files that it did unistall.
i try log it when uninstall happen the codes:
function OnUninstallingFile(File)
NUMBER  nvFileHandle;
begin
OpenFileMode(FILE_MODE_APPEND);
   if (!Is (FILE_EXISTS, "C:\\Uninstall.txt")) then
CreateFile(nvFileHandle, "C:\\", "Uninstall.txt");  
else
OpenFile(nvFileHandle, "C:\\", "Uninstall.txt");  
endif;

WriteLine(nvFileHandle,File);
WriteLine(nvFileHandle,"");
CloseFile(nvFileHandle);  

end;

open the C:\uninstall yes.. there are file that are files that succefully uninstall which should not be happened.
any ideas on how soleve this..?

Thank you.

Jemoo

Jemoo
  • Members
  • 9 posts

Posted 13 May 2002 - 07:01

Seems to me that during the installation time, when i click cancel button the process are:
Installation time : call function OnInstallingFile(File)
Click cancel: call the function OnCanceling()
in OnCanceling() the codes default are
if (IDYES = SprintfBox(MB_YESNO|MB_ICONEXCLAMATION|MB_DEFBUTTON2,
                          SdLoadString(SD_STR_ONCANCELING_TITLE),
                          SdLoadString(SD_STR_ONCANCELING_MSG))) then
                    abort;

       endif;  
       
   endif;

after abort it will call function OnUninstallingFile(File) to unisntall all the files that succesfully install.

This is not the case on Canceling setup when uninstallation.
it does goes to abort statement , then it does not goes to function OnInstallingFile(File)

any workaround on this?
i did do this on OnCencelling but it does not work...
if (MAINTENANCE) then
a = ComponentReinstall();
        SetStatusWindow(0, "");
           Enable(STATUSEX);
           StatusUpdate(ON, 100);
       else  
               abort;

any ideas?
Should just disable the cancel button ? but this does not work too since the esc button will pops the cancel meessage also.

Thank you
- jeMoo

Ide Nentjes

Ide Nentjes
  • Members
  • 222 posts

Posted 13 May 2002 - 08:52

Create a backup in OnMoving (to SUPPORTDIR would be best),
Restore the backup in OnAbort,
Remove the backup in OnEnd.