Announcement

Collapse
No announcement yet.

Uninstaller stop working

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Uninstaller stop working

    Hi,

    I'm trying to uninstall our program completely. But uninstaller stop working.

    Because our application will create some log files and other files in the application folder in the run time, I try to call Folder.DeleteTree to delete all files and folders at "On Post Uninstall" event. Uninstaller stop working after "On Shut Down" event.

    In the end, I found if I delete one specific folder at "On Post Uninstall" event, uninstaller crashed because of trying to delete that folder after "On Shut Down" event. That folder is normal. I don't know why.

    Therefore, I tried a workaround.
    I enumerate all files and folders at "On Post Uninstall" event and then delete them one by one except that specific folder.
    Uninstaller will not crash and program is uninstalled completely.

    But there is still one another problem. After "On Shut Down" event, cmd.exe will be launched and not be closed. This will prevent other applications from being uninstalled. It shows that there is some other application still uninstalling.

    Is there any suggestion about this?

    Thanks

  • #2
    Using Folder.DeleteTree() on the parent folder where the uninstaller is running will give you problems, and you don't want to do that. You can try to delete any legacy files from the AppFolder in the On Post Uninstall event, but leave the uninstaller folder itself untouched - it will be deleted when the uninstaller exits.

    But there is still one another problem. After "On Shut Down" event, cmd.exe will be launched and not be closed. This will prevent other applications from being uninstalled. It shows that there is some other application still uninstalling.
    Is there any suggestion about this?
    Simply launching cmd.exe will not prevent other applications from being uninstalled, so your description is most likely inaccurate. As you did not attach the project file, I bet that the message that an uninstall is still in progress comes from Windows Installer, which was used to remove a product from the computer, and which is still working in the background, or crashed because you deleted some required files, or it asked for a system reboot which is still pending.

    Ulrich

    Comment

    Working...
    X