Announcement

Collapse
No announcement yet.

Uninstalling folders

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Uninstalling folders

    I have a folder within the file structure where users can place content that can then be read from my program. The trouble is I want to delete the contents of this folder when the uninstall program is run. The folder will contain other folders which I do not know the names of.
    How do I delete all the folders and files within a folder if I don't know the names?

  • #2
    Re: Uninstalling folders

    use the delete files funciton. its very simple.

    Comment


    • #3
      Re: Uninstalling folders

      Your reply was not very helpful. I have used the delete files function and as you say it is very easy! I think maybe you didn't understand the question.
      I can only seem to delete the files in the folder that I know the name of.. for instance 'Remove Directory' source:'AppDir%\subfolder' will not work because there is still content within this folder... 'Delete' source:%AppDir%\subfolder\*.* will only delete the files within the folder: 'subfoler'. What I want to do is remove all folders and content of folders from within folder 'subfolder'.

      For instance a user will create a folder called 'unique' and have files within it. The path is now :%AppDir%\subfolder\unique. As I do not know what the user will call the folder I cannot inculde 'Delete' source:%AppDir%\subfolder\unique\*.*.

      Is there a way to remove ALL the contents of 'subfolder' when the user uninstalls?

      Comment


      • #4
        Re: Uninstalling folders

        OK I GET IT NOW.

        So you have to know the name of the subfolders first. Hmmmmm good question. I dont think there is a way to find a directory created by a user.

        Suppose i create c:\dan\dan2\dan3\dan4. The path is not written to the system. So in myopinion its allmost impossible.

        But one thing you might do,

        Comment


        • #5
          Re: Uninstalling folders

          sorry about that half finished reply. This is what you can do:
          USE THE DELETE FILES FUNCTION.

          and check the recurse subdirectories.

          THIS SHOULD TAKE CARE OF IT

          Comment


          • #6
            Re: Uninstalling folders

            sorry but I don't know what 'check the recurse subdirectories' means
            ..??

            Comment


            • #7
              Re: Uninstalling folders

              Hi,

              "Recurse Subdirectories" is a checkbox that can be found on the Delete Files action in Setup Factory 6.0.

              mark.
              MSI Factory The Next Generation Intelligent Setup Builder

              Comment


              • #8
                Re: Uninstalling folders

                If you need help, you can send me your project. will take a look and give you suggestion on how to improve it.

                here is my email.

                [email protected]

                Comment


                • #9
                  Re: Uninstalling folders

                  Thanks for your help Dan. I am currently still using version 5.0
                  Looks like I'll have to upgrade
                  >>iggy<<

                  Comment


                  • #10
                    Re: Uninstalling folders

                    yes upgrading is always the best option.

                    Comment

                    Working...
                    X