Announcement

Collapse
No announcement yet.

How do you remove Installation Folder?

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

  • How do you remove Installation Folder?

    The software I am installing with SF6 creates various cache and log files within the installation directory during its life time. When the user goes to uninstall, these files are obviously not removed by SF6 as they were not part of the original install. How can I remove the installation folder and all of its files after the uninstall? I tried the Remove Folder action using %AppDir% within After Uninstalling but when uninstalling I get the error "Could not remove directory.".

    Thanks for the help.

  • #2
    Re: How do you remove Installation Folder?

    I have been successfull within the "After Uninstalling" putting in as the last command:

    Delete Files (%AppDir%\*)

    and I check all 3 checkboxes (recurse, continue on failure, delete hidden files)

    You cannot delete a directory if it is not first emptied. SF6 takes care of deleting the %AppDir% if it is empty.

    Comment


    • #3
      Re: How do you remove Installation Folder?

      A directory can only be removed in Setup Factory if it is empty, therefore if there are contents, the removal will fail.

      If all of the files you would like to remove are in the root of the application directory, what you could do is use a "Delete Files" action with a wild card, such as %AppDir%\*.*

      Since the removal of the main directory failed initially, you need an action to remove it, therefore you would follow that action with a "Remove Directory" action in order to remove %AppDir%.

      Hope that helps.

      Comment


      • #4
        Re: How do you remove Installation Folder?

        Thanks guys. Really appreciate the response time. This software is awesome!

        Comment


        • #5
          Re: How do you remove Installation Folder?

          Lets say, i give %AppDir%\*.*. Suppose, if i install the package in the C:\ drive. So, during uninstall, will it delete all the files in the C:\ drive? if it deletes so, its very danger [img]/ubbthreads/images/icons/frown.gif[/img]

          Comment


          • #6
            Re: How do you remove Installation Folder?

            Yes, you're absolutely right, it is dangerous if you have designed your install to allow that install possibilty. Care must be taken when designing it.

            Other options are to only delete certain file types, such as *.log

            Or to only delete individual files with actions. I presume you know what will be created.

            If you know what files will be generated and where they will be located, you can also add contents to the uninstall program list. You can find a Knowledge Base article at the following URL:

            http://www.indigorose.com/ubbthreads...o=0&fpart=

            Comment


            • #7
              Re: How do you remove Installation Folder?

              okay, if you're afraid of people installing directly to the c:, you could maybe try this:

              say, the user chose C:\ as his install dir, so that would become %AppDir%
              you could then have maybe 1 or 2 files install openly to AppDir, but then have the rest of the files install to %AppDir%\subdir so that your files are fully organized to make the uninstall easier

              then, to uninstall, you would say Remove %AppDir%\subdir\*
              then Remove %AppDir%\subdir, and then remove any specific filenames that you had installed directly into %AppDir%

              that should prevent any problems
              w00t

              Comment


              • #8
                Re: How do you remove Installation Folder?

                You could also do the following:

                Go to your "Select Install Folder" screen.
                Click the CUSTOM tab.
                Uncheck the "Install Folder field is enabled" checkbox.
                Then check the "Use sticky folder name" checkbox and enter your application name.

                Using this method, you can prohibit the user from directly entering their own path other than browsing for a folder as well as forcing the user to install to a folder who's name you can control.

                Just another method that can be used.

                Comment

                Working...
                X
                😀
                🥰
                🤢
                😎
                😡
                👍
                👎