Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: How to "uninstall" files extracted from an archive?  (Read 19290 times)

0 Members and 1 Guest are viewing this topic.

Porthus

    Topic Starter


    Rookie

    How to "uninstall" files extracted from an archive?
    « on: April 11, 2009, 10:24:35 AM »
    Hello. My question isn't about any specific program or utility, but merely as an example, I'll refer the Wrye Bash utility used to manage and install mods for the game Oblivion. This particular utility is distributed as a .zip archive, and it has no installer. The installation instructions tell to simply extract the archive to the same installation folder where the game is installed. Supposedly this would overwrite all the files there from the old versions of the program, and uninstallation of any previous version wouldn't be necessary. Last year I installed it and since July of that year, I haven't used or updated Wrye Bash, and more than 75 new versions were released! Now I'd like to uninstall it before I install the latest version, but there's no uninstaller for it. The Uninstallation wouldn't be necessary if the files to be extracted from the new version's archive overwrote all the files extracted earlier from the old version's archive, but this doesn't happen for all the files: some of them are not overwritten. This brought me to this forum.

    I'd like to know if there's any way to automatically uninstall (delete) all the files extracted from an archive. There must be a simple way to achieve this I'm not aware of. The hard way would be in Windows explorer to select each and every file in the destination directory which was extracted there from the archive, and then delete them. Is there any easier way to do this? Basically, I wish to know if there's any way to undo the extracting procedure, by automatically removing the files which were extracted to the destination directory.

    I was hoping that converting the original .zip archive to a SFX archive with WinRar, I could then use this .exe SFX archive to both install (extract to) and uninstall (remove) the extracted files to/from the destination directory, but apparently, I'm only able to automatically extract the files to their destination directory, but I don't know how to uninstall those files, that is, I can use the SFX file created by me as an installer, but not as uninstaller.
    « Last Edit: April 11, 2009, 02:35:54 PM by Porthus »

    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Re: How to "uninstall" files extracted from an archive?
    « Reply #1 on: April 11, 2009, 10:58:40 AM »
    Deleting the files = uninstalling.

    Quote
    The hard way would be in Windows explorer to select each and every file in the destination directory which was extracted there from the archive, and then delete them.

    How is that the "hard way"? Ctrl+A, Delete, yes to all. done.
    I was trying to dereference Null Pointers before it was cool.

    Porthus

      Topic Starter


      Rookie

      Re: How to "uninstall" files extracted from an archive?
      « Reply #2 on: April 11, 2009, 02:17:34 PM »
      Deleting the files = uninstalling.

      How is that the "hard way"? Ctrl+A, Delete, yes to all. done.

      No, it is not just as simple as that, or else I wouln't have started his thread. It would be that simple if you extracted the files to an empty folder. If it was it, then you could simply delete that folder or all the files within it to uninstall. It's not as simple if the destination directory of the extraction must be a folder containing already other important files which must not be deleted. Have you read the example I gave in first paragraph of the open post ? To install Wrye Bash utility, you would have to extract contents of Wrye Bash installation archive to Oblivion installation folder. The installation archive contains folders and subfolders, some of them with the same name of those already there. During this extraction, files will be copied to subdirectories of the game's root installation folder, overwriting files with the same name already there (old files installed from earlier versions of Wrye Bash). If I simply did Ctrl+T and Delete in the destination folder (C:\My Games\Bethesda Softworks\Oblivion\), the game would not run anymore. To uninstall Wrye Bash properly, I would have to delete in the destination folder only those files which came from the Wrye Bash installation archive, not the files created during the game installation nor any files from mods installed thereafter. Makes sense?

      Wait. In Windows explorer:
      Ctrl+T=Selects everything in the opened directory
      Ctrl+A= ?

      You meant Ctrl+T, right?
      « Last Edit: April 12, 2009, 05:46:18 AM by Porthus »

      BaRR



        Beginner

        Thanked: 6
        • Certifications: List
        • Experience: Experienced
        • OS: Windows 7
        Re: How to "uninstall" files extracted from an archive?
        « Reply #3 on: April 11, 2009, 02:42:37 PM »
        Well then, what you should do is find out which files are related to oblivion, and which are related to Wyre Brash. If you don't have a list of the files contained in the zip, or you don't have the original zip, that might be your only choice. However, if the new version will function without removing the old files, then you might not want to tamper with the files. Another option is to look in the Oblivion disk(s) by holding down the "shift" key and double clicking the drive the CD is in. (If you don't, it will likely run the installer instead of letting you view the files.) Then, find out which files AREN'T from oblivion and delete them. Lastly, you can just try to uninstall oblivion, delete the program folder and make a fresh install, and place the newest version.

        There is no "uninstall" function for .zip files, that must be provided by the software developer, or if you have a bit of computer skill, you can even make one yourself with programs such as Install Creator, or of course choose any other installation creator that you like (many are available free). You would need the original zip to make an installer and uninstaller, however. This would be useful for future installations, so you won't need to manually remove the files every time.

        An obvious point here, is that I'm just presenting all options possible, you may not want to go that far.

        BC_Programmer


          Mastermind
        • Typing is no substitute for thinking.
        • Thanked: 1140
          • Yes
          • Yes
          • BC-Programming.com
        • Certifications: List
        • Computer: Specs
        • Experience: Beginner
        • OS: Windows 11
        Re: How to "uninstall" files extracted from an archive?
        « Reply #4 on: April 11, 2009, 06:57:01 PM »
        there is no "simple way" to delete only files found in a archive.


        you cannot uninstall it, because technically it was never installed.


        This would be similar to updating the BUILD editor files that are available for some older games.


        You should be able to simply extract the new one over top of the old.


        Wait. In Windows explorer:
        Ctrl+T=Selects everything in the opened directory
        Ctrl+A= ?

        You meant Ctrl+T, right?


        No... I mean Control-A. you must be in a different Locale, which uses a different shortcut, which is why there is a discrepancy.

        Ctrl-T does nothing in any of my explorer windows.




        Some ZIP programs have a option to save a file listing- for example, PowerArchiver has a option to export the file list to a text file.


        if you can create a listing of the files in the zip, you can use the following batch file to selectively delete only those files present in the zip archive:

        Code: [Select]
        @echo off
        for /f %%P in ('type listing.txt') do del %%P

        Save that with notepad in your oblivion folder. listing.txt would be a text files that only contains the files in the zip.


        Here is one way you can generate a listing of the files:

        extract the zip to a different folder, and then create a small batch file in that folder:

        Code: [Select]
        @echo off
        dir /b > listing.txt

        save it in the new folder you've temporarily extracted the zip to. It will generate a listing of the files in the zip (except folders, but those are hopefully not quite a pain to delete, I hope)

        Now you copy that listing.txt to the oblivion folder where the first batch file resides, and run the first one. It will delete all the files listed in the ZIP listing you generated .


        *be sure to create the listing with a NEW folder where the zip is extracted*
        I was trying to dereference Null Pointers before it was cool.

        Porthus

          Topic Starter


          Rookie

          Re: How to "uninstall" files extracted from an archive?
          « Reply #5 on: April 12, 2009, 05:36:01 AM »
          There is no "uninstall" function for .zip files, that must be provided by the software developer, or if you have a bit of computer skill, you can even make one yourself with programs such as Install Creator, or of course choose any other installation creator that you like (many are available free). You would need the original zip to make an installer and uninstaller, however. This would be useful for future installations, so you won't need to manually remove the files every time.
          Thank you, BaRR. Yes, I still have the zip archive I used in my last Wrye Bash installation. It is ”Wrye Bash 190.zip“. I didn't know of such installation creator programs you mention, probably they could be useful for what I intended: I could create an installer/uninstaller and use it to reinstall and then uninstall Wrye Bash. However, my computer skills are limited and I'm not sure if it would make up for the effort, in this particular case. In this particular case, I think I'll rather try the solution provided by BC_Programmer in Reply #4.

          Some ZIP programs have a option to save a file listing- for example, PowerArchiver has a option to export the file list to a text file.


          if you can create a listing of the files in the zip, you can use the following batch file to selectively delete only those files present in the zip archive:

          Code: [Select]
          @echo off
          for /f %%P in ('type listing.txt') do del %%P

          Save that with notepad in your oblivion folder. listing.txt would be a text files that only contains the files in the zip.


          Here is one way you can generate a listing of the files:

          extract the zip to a different folder, and then create a small batch file in that folder:

          Code: [Select]
          @echo off
          dir /b > listing.txt

          save it in the new folder you've temporarily extracted the zip to. It will generate a listing of the files in the zip (except folders, but those are hopefully not quite a pain to delete, I hope)

          Now you copy that listing.txt to the oblivion folder where the first batch file resides, and run the first one. It will delete all the files listed in the ZIP listing you generated .


          *be sure to create the listing with a NEW folder where the zip is extracted*

          This solution interests me. I'll try to do it! I don't have PowerArchiver, but in WinRar I opened the archive - ”Wrye Bash 190.zip“. Then I used the menu Tools>Generate report, then in the Generate report window I de-selected all the default options and clicked 'OK'. This created the report file ”Wrye Bash 190.txt“ in the same directory as ”Wrye Bash 190.zip“, listing files (with the full paths) but also the folders within the archive. It is as follows:

          Code: [Select]
          Data
          Data\Bash Patches
          Data\Bash Patches\Bash_Groups.csv
          Data\Bash Patches\Bash_MFact.csv
          Data\Bash Patches\Guard_Names.csv
          Data\Bash Patches\Leveled Lists.csv
          Data\Bash Patches\Rational_Names.csv
          Data\Bash Patches\TI to Cobl_Formids.csv
          Data\Docs
          Data\Docs\Bash Readme Template.html
          Data\Docs\Bash Readme Template.txt
          Data\Docs\Bashed Lists.html
          Data\Docs\Bashed Lists.txt
          Data\Docs\wtxt_sand_small.css
          Data\Docs\wtxt_teal.css
          Data\INI Tweaks
          Data\INI Tweaks\Autosave, Never.ini
          Data\INI Tweaks\Autosave, ~Always.ini
          Data\INI Tweaks\Grass, Fade 4k-5k.ini
          Data\INI Tweaks\Save Backups, 1.ini
          Data\INI Tweaks\Save Backups, 2.ini
          Data\INI Tweaks\Save Backups, 3.ini
          Data\INI Tweaks\Save Backups, 5.ini
          Mopy
          Mopy\balt.py
          Mopy\bash.py
          Mopy\basher.py
          Mopy\bashmon.py
          Mopy\bish.py
          Mopy\bolt.py
          Mopy\bosh.py
          Mopy\bush.py
          Mopy\Data
          Mopy\Data\Actor Levels
          Mopy\Data\Actor Levels\OOO, 1.23 Mincapped.csv
          Mopy\Data\Actor Levels\OOO, 1.23 Uncapped.csv
          Mopy\Data\Oblivion_ids.pkl
          Mopy\Extras
          Mopy\Extras\Bashed Patch, 0.esp
          Mopy\Extras\Blank.esp
          Mopy\gpl.txt
          Mopy\images
          Mopy\images\bash_16.png
          Mopy\images\bash_16_blue.png
          Mopy\images\bash_32.ico
          Mopy\images\bash_32.png
          Mopy\images\bash_32_2.png
          Mopy\images\bash_32_blue.png
          Mopy\images\checkbox_black_on.png
          Mopy\images\checkbox_blue_imp.png
          Mopy\images\checkbox_blue_inc.png
          Mopy\images\checkbox_blue_off.png
          Mopy\images\checkbox_blue_on.png
          Mopy\images\checkbox_blue_on_32.png
          Mopy\images\checkbox_green_imp.png
          Mopy\images\checkbox_green_inc.png
          Mopy\images\checkbox_green_off.png
          Mopy\images\checkbox_green_on.png
          Mopy\images\checkbox_green_on_32.png
          Mopy\images\checkbox_orange_imp.png
          Mopy\images\checkbox_orange_inc.png
          Mopy\images\checkbox_orange_off.png
          Mopy\images\checkbox_orange_on.png
          Mopy\images\checkbox_purple_imp.png
          Mopy\images\checkbox_purple_inc.png
          Mopy\images\checkbox_purple_off.png
          Mopy\images\checkbox_purple_on.png
          Mopy\images\checkbox_red_imp.png
          Mopy\images\checkbox_red_inc.png
          Mopy\images\checkbox_red_off.png
          Mopy\images\checkbox_red_on.png
          Mopy\images\checkbox_red_x.png
          Mopy\images\checkbox_yellow_imp.png
          Mopy\images\checkbox_yellow_inc.png
          Mopy\images\checkbox_yellow_off.png
          Mopy\images\checkbox_yellow_on.png
          Mopy\images\doc_on.png
          Mopy\images\dos.PNG
          Mopy\images\help.png
          Mopy\images\karma_zero.png
          Mopy\images\oblivion.png
          Mopy\images\obmm.png
          Mopy\images\save_off.png
          Mopy\images\save_on.png
          Mopy\images\tes4view.png
          Mopy\images\tescs.png
          Mopy\images\WryeBash_01.png
          Mopy\images\WryeBash_02.png
          Mopy\images\WryeBash_03.png
          Mopy\images\WryeBash_04.png
          Mopy\images\WryeBash_05.png
          Mopy\images\WryeBash_06.jpg
          Mopy\images\WryeBash_07.png
          Mopy\images\WryeBash_08.png
          Mopy\images\wrye_monkey_87.jpg
          Mopy\images\zoom_on.png
          Mopy\locale
          Mopy\locale\de.txt
          Mopy\locale\Italian.txt
          Mopy\locale\pt_opt.txt
          Mopy\locale\Russian.txt
          Mopy\Wrye Bash for Python 2.4.lnk
          Mopy\Wrye Bash for Python 2.5.lnk
          Mopy\Wrye Bash.html
          Mopy\Wrye Bash.txt

          Note that Data; Data\Bash Patches; Data\Docs; Data\INI Tweaks; Mopy; Mopy\Data; Mopy\Data\Actor Levels; Mopy\Extras; Mopy\images; Mopy\locale, are all folders and subfolders, not files. According to your instructions, I would now write the following batch file, replacing only ”listing.txt“ by ”Wrye Bash 190.txt“:

          Code: [Select]
          @echo off
          for /f %%P in Wrye Bash 190.txt do del %%P

          I'll name it ”Wrye Bash 190.bat“. Then I would place ”Wrye Bash 190.txt“ and ”Wrye Bash 190.bat“ both in the Oblivion folder. But then, if I run ”Wrye Bash 190.bat“ will not only the files but also the folders listed in ”Wrye Bash 190.txt“ be deleted? I cannot risk to delete Data folder, for instance, because it contains most other files and folders not coming from Wrye Bash installation, which are important for the game to run. Should I manually remove the folders listed in ”Wrye Bash 190.txt“ and leave only the files, to avoid the risk of deleting important game folders? Or rather, the Batch file you wrote will delete only the files, but not the folders listed in ”Wrye Bash 190.txt“?


           
          « Last Edit: April 12, 2009, 05:58:44 AM by Porthus »

          BC_Programmer


            Mastermind
          • Typing is no substitute for thinking.
          • Thanked: 1140
            • Yes
            • Yes
            • BC-Programming.com
          • Certifications: List
          • Computer: Specs
          • Experience: Beginner
          • OS: Windows 11
          Re: How to "uninstall" files extracted from an archive?
          « Reply #6 on: April 12, 2009, 09:07:07 AM »
          hmm, it includes folder names as well as the files inside.

          the "del" command seems to delete folders, but it puts up a prompt, and that will cause issues if it tries to delete files within that folder (since it doesn't exist).


          I would remove the folder names, since as you said you want to keep the data folder.

          In fact, you might even go so far as to make a backup of the important folders for the game,just in case.


          The batch file and the listing file you would place in the location you extracted the zip originally- the oblivion install folder, I imagine.


          Just one change to the proposed batch:

          Code: [Select]
          @echo off
          for /f %%P in "Wrye Bash 190.txt" do del %%P

          you need to quote the file name, because it has spaces. :)


          So- remove the folder names as you've suggested, and it should work as planned.


          I would personally make a copy of the entire oblivion folder, just ot be on the safe side (disk space allowing). That way if the game for some reason get's fuzzled and won't start anymore, you can copy the folder back over it.

          I was trying to dereference Null Pointers before it was cool.

          Porthus

            Topic Starter


            Rookie

            Re: How to "uninstall" files extracted from an archive?
            « Reply #7 on: April 12, 2009, 05:44:13 PM »
            I did what you said, but unfortunately, it didn't work :(: The files listed in ”Wrye Bash 190.txt“ weren't deleted upon double clicking on ”Wrye Bash 190.bat“. Then, I tried to run ”Wrye Bash 190.bat“ from command line prompt (Start Menu>Run...>cmd). I used the command cd to change the prompt to C:\My Games\Bethesda Softworks\Oblivion> and typed Wrye Bash 190.bat. The error returned was (translating from portuguese): «'Wrye' is not recognised as an internal or external command, operational program or batch file.» Then I renamed ”Wrye Bash 190.bat“ to ”Wrye_Bash_190.bat“ and tried again. This time, the error returned was (translating from portuguese): «"Wrye Bash 190.txt" wasn't expected at this time.»  ??? Then, I tried to rename ”Wrye Bash 190.txt“ to ”Wrye_Bash_190.txt“, editing also the batch file ”Wrye_Bash_190.bat“ accordingly to look like this:

            Code: [Select]
            @echo off
            for /f %%P in Wrye_Bash_190.txt do del %%P

            Again, It didn't work. The command prompt returned an identical error «Wrye_Bash_190.txt wasn't expected at this time.»
            Any suggestions?

            BC_Programmer


              Mastermind
            • Typing is no substitute for thinking.
            • Thanked: 1140
              • Yes
              • Yes
              • BC-Programming.com
            • Certifications: List
            • Computer: Specs
            • Experience: Beginner
            • OS: Windows 11
            Re: How to "uninstall" files extracted from an archive?
            « Reply #8 on: April 12, 2009, 05:45:29 PM »
            I know. that's why I said to enclose the name in the for command in quotes.
            Just one change to the proposed batch:

            Code: [Select]
            @echo off
            for /f %%P in "Wrye Bash 190.txt" do del %%P
            you need to quote the file name, because it has spaces. :)

            I was trying to dereference Null Pointers before it was cool.

            Porthus

              Topic Starter


              Rookie

              Re: How to "uninstall" files extracted from an archive?
              « Reply #9 on: April 12, 2009, 05:55:29 PM »
              I know! Like I said in the beginning of my previous post, I did what you said. That is, I had created this batched patch:

              Code: [Select]
              @echo off
              for /f %%P in "Wrye Bash 190.txt" do del %%P

              Only then, after I saw it didn't work, I renamed the files as I described in my previous post, and then edited the batch file accordingly to:

              Code: [Select]
              @echo off
              for /f %%P in Wrye_Bash_190.txt do del %%P
              This time without the quotes, because it no longer has spaces in the new name. Still didn't work!


              BC_Programmer


                Mastermind
              • Typing is no substitute for thinking.
              • Thanked: 1140
                • Yes
                • Yes
                • BC-Programming.com
              • Certifications: List
              • Computer: Specs
              • Experience: Beginner
              • OS: Windows 11
              Re: How to "uninstall" files extracted from an archive?
              « Reply #10 on: April 12, 2009, 06:01:03 PM »
              remove the echo off. Are there any error messages?
              I was trying to dereference Null Pointers before it was cool.

              Porthus

                Topic Starter


                Rookie

                Re: How to "uninstall" files extracted from an archive?
                « Reply #11 on: April 12, 2009, 06:21:39 PM »
                Yes. Appeared this:
                 
                Quote
                Wrye_Bash_190.txt wasn't expected at this time.

                C:\My Games\Bethesda Softworks\Oblivion>for /f %P in Wrye_Bash_190.txt do del %P
                Note that after >, the text is similar of that of the batch file, but with %P instead of %%P.

                Below that, appears the expected prompt C:\My Games\Bethesda Softworks\Oblivion> with the blinking cursor _ right after it.

                BC_Programmer


                  Mastermind
                • Typing is no substitute for thinking.
                • Thanked: 1140
                  • Yes
                  • Yes
                  • BC-Programming.com
                • Certifications: List
                • Computer: Specs
                • Experience: Beginner
                • OS: Windows 11
                Re: How to "uninstall" files extracted from an archive?
                « Reply #12 on: April 12, 2009, 07:07:14 PM »
                oh...


                oops- my bad!

                heh, I'm not the batch expert- major F-up on my part.


                it should have been:
                Code: [Select]
                FOR /F "usebackq delims=" %i IN (`type "Wrye_Bash_190.txt"`) DO @echo %i


                for safety purposes I have used "echo" instead of "del" at the end- run it once, verify that the list of files it prints seems appropriate, and then change @echo to @del.


                Once again sorry for the confusion- I'm not the resident batch guru here, just a very bad poser lol.
                I was trying to dereference Null Pointers before it was cool.

                Porthus

                  Topic Starter


                  Rookie

                  Re: How to "uninstall" files extracted from an archive?
                  « Reply #13 on: April 12, 2009, 07:47:20 PM »
                  I replaced the batch commands in Wrye_Bash_190.bat by this:

                  Code: [Select]
                  FOR /F "usebackq delims=" %i IN Wrye_Bash_190.txt DO @echo %i
                  Now when I run Wrye_Bash_190.bat, the command line prompt returns this:

                  Quote
                  i wasn't expected at this time.

                  C:\My Games\Bethesda Softworks\Oblivion>FOR /F "usebackq delims=" i

                  I'm going to sleep now. It's 2:45 A.M. here!  Tomorrow, I'll check back on this thread. Good night.

                  BC_Programmer


                    Mastermind
                  • Typing is no substitute for thinking.
                  • Thanked: 1140
                    • Yes
                    • Yes
                    • BC-Programming.com
                  • Certifications: List
                  • Computer: Specs
                  • Experience: Beginner
                  • OS: Windows 11
                  Re: How to "uninstall" files extracted from an archive?
                  « Reply #14 on: April 12, 2009, 08:00:45 PM »
                  Quote
                  FOR /F "usebackq delims=" %i IN Wrye_Bash_190.txt DO @echo %i

                  Quote
                  FOR /F "usebackq delims=" %%i IN (`type "Wrye_Bash_190.txt"`) DO @echo %%i


                  I forgot the percent signs- but you didn't copy it with the single apostrophes and such.

                  I was trying to dereference Null Pointers before it was cool.