Advertisement
Tux_528

Leftovers Hunter Documentation (English)

Jul 8th, 2023
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.67 KB | None | 0 0
  1. Instructions for use :
  2. ----------------------
  3. - Step 0: to ensure a reliable and representative search for all leftovers, I recommend that you follow the steps below:
  4.  
  5. -> perform a full anti-malware scan of the system with the Malwarebytes and AdwCleaner pieces of software to delete any malware and unwanted software that the script may detect only halfway, if at all.
  6.  
  7. -> uninstall all unnecessary software, preferably with a specialized utility like Revo Uninstaller Pro that will do it very quickly and efficiently (feel free to use my toolbox to download and use it in seconds ;)).
  8.  
  9. -> use the "Deep Scan" feature of the Wise Registry Cleaner software, which is very efficient at removing all the empty keys and registry values that have become obsolete after uninstalling pieces of software. Some specific keys and values may indeed refer to uninstalled software folders and distort the detection of leftovers. This makes it possible to perform an initial clean-up of the system to ensure that the search and security algorithms of the script work correctly afterward.
  10. In addition, certain types of leftovers such as old file extensions cannot be correctly detected by the script at the moment, so using a safe registry cleaner like WRC is very useful for detecting and removing these subtle and complex-to-find leftovers.
  11.  
  12. -> close all portable software in use to prevent false positives.
  13.  
  14. - Step 1: Run the "Leftovers Hunter 0.5 Beta.cmd" script as administrator and wait a while. The search for leftovers takes a few minutes, while every corner of the system is thoroughly scanned and checked.
  15.  
  16. - Step 2: Once the search is complete, press a key to open a detailed report of all the leftovers found.
  17.  
  18.  
  19. Detailed script operation :
  20. ---------------------------
  21. This script takes care of processing every item present in many different locations on the disk and in the registry to check whether it corresponds to an installed software name or editor. In particular, it handles the well-known "Program Files" and "AppData" folders, as well as many other folders and registry keys used to store software data.
  22. The current version thus counts a total of 23 locations which are thoroughly analyzed. The main algorithm is based on a large text file called "Database.txt" which is created before the search for leftovers and contains all the registry entries of installed software, including their name, their editor, or their installation path. This text file is therefore indispensable for effectively differentiating a leftover from a folder or a registry key that may contain any software settings or data.
  23.  
  24. In addition to this sort of database, the script also uses four text files named "Excluded Strings.txt", "Ignored Strings.txt", "Blacklisted Strings.txt", and "Custom Rules.txt".
  25. The first lists strings and regular expressions corresponding to very important system item names that should be excluded from the search for leftovers. The second has almost the same purpose as the first, but this time concerns generic strings to be ignored from advanced searches for all items that would have yielded no successful results in the database.
  26. As for the third, it lists the names of useless and unwanted items that are automatically detected as leftovers, such as generic folders created by the Squirrel and Electron frameworks or registry keys created by ready-to-use debugging software used by certain well-known games and pieces of software.
  27. Finally, the fourth file contains custom exclusion rules to exclude names and paths of items that are impossible to detect under normal circumstances and which are used by very specific software.
  28.  
  29. For this beta version, a log creation feature is activated by default to facilitate project enhancement. During the search for leftovers, the script will automatically create a text file of the form "Log of Date at Time.log" to keep track of all search strings used during the process. This comes in very handy for improving the search and detection algorithms for leftovers and flushing out complex and subtle bugs.
  30.  
  31. Independently of this mode, the script also creates a report of the form "Leftovers Found on Date at Time.txt", which will be used to list the path of all detected leftovers. Among all the other text files mentioned above, this will be the most useful and usable for the end user.
  32.  
  33. All the text files mentioned above will be automatically compressed into a debug archive of the form "Debug Files of Date at Time.zip" for easy sharing with the developer.
  34.  
  35.  
  36. Report format used to list detected leftovers :
  37. -----------------------------------------------
  38. The report has been designed to be as simple and understandable as possible. It contains a complete list of all the leftovers detected during the search process.
  39.  
  40. It is currently divided into two parts: folders and register keys. Each part is preceded by an associated header and followed by the total number of items found, including the number of empty and blacklisted items.
  41. For folders, a line indicating the total size occupied on disk in megabytes is specified. In contrast, registry keys have a negligible size, which is not indicated.
  42.  
  43. Note that the path of detected leftovers can be delimited by a horizontal bar and followed by a descriptive category in uppercase that determines its type. The latest version of the script thus indicates empty items (symbolized by the "EMPTY ITEM" category), blacklisted items (indicated by the "BLACKLISTED ITEM" category), and unwanted items (designated by the "UNWANTED ITEM" category).
  44.  
  45.  
  46. How to contribute?
  47. --------------------
  48. The best thing you can do to contribute to this project is to send me the debugging archive that contains all the files created during the search for leftovers on your PC. It would greatly help me to analyze how the search and detection algorithms work in real-life conditions and flush out potential bugs that would only occur on specific configurations like yours. To know more about these automatically created files, please read the category that details how this project works.
  49.  
  50. Of course, if you encounter any problems or have any suggestions on the code or user experience, feel free to let me know; I'd be delighted to read all your feedback and take it into account for future versions.
  51.  
  52.  
  53. FAQ
  54. ----
  55.  
  56. What is the purpose of this project?
  57.  
  58. The purpose of this big Batch script is very simple: it allows you to search for any leftovers of uninstalled software on Windows.
  59.  
  60. Despite what you may think, when you have fun uninstalling pieces of software by hand from the Control Panel or the Settings, they won't uninstall completely and delete all traces of themselves. The vast majority of official uninstallation programs leave traces of varying significance on the system, whether on the disk or in the registry. The problem is that for some pieces of software, the size of the remaining folders can vary greatly, ranging from 1 megabyte to 200 megabytes or even more. Specialized uninstallers such as Revo Uninstaller Pro or Total Uninstall are available to solve this problem, but they are only useful when you are about to clean up the pieces of software installed on your configuration.
  61.  
  62. Unfortunately, the developers of your favorite software and games are very often negligent. Most of the time, the uninstall programs they supply with their respective products are content to leave behind useful data, such as settings or license information that could be used if the user reinstalls the concerned software in the future. However, in the case of paid-for pieces of software, they sometimes deliberately forget to remove information about the trial period. This will make it possible to detect a potential antique installation in the future and signal that the trial period has expired in the meantime, in an attempt to get you to buy the product in question. The funny thing is that specialized uninstallers such as Revo Uninstaller Pro also do this, even though they are supposed to correct this problem.
  63.  
  64. But what if you've uninstalled software by hand and didn't know that uninstallers existed or didn't use them at this moment? Well, you simply can't remove these leftovers easily. The problem is that you can't predict with any certainty what traces the pieces of software you install will leave behind. If you are experienced in the field, some leftovers are easy enough to detect as they contain the name of the software concerned and are not scattered in every corner of the system. But it also happens that questionable software uses stupid or very subtle names that don't contain the name of the software or only the name of the publisher. It can even happen that they use generic names that are very difficult, if not impossible, to detect, such as the initials of the software or a misleading name that you could potentially confuse with a really useful system item. In other words, unless you know your way around and spend several hours doing it by hand, it's impossible.
  65.  
  66. To my knowledge, there is no software as effective and comprehensive as mine for detecting and cleaning up this kind of item. The built-in feature of IObit Uninstaller is laughable since it only detects known leftovers that are listed in a proprietary database, and the tool of SoftOrganizer is not at all efficient, while CCleaner doesn't clean up these kinds of traces, so I started from scratch to create my solution.
  67.  
  68.  
  69. What's the point of cleaning up all those leftovers on my PC?
  70.  
  71. Contrary to what you might think, the leftovers of uninstalled software can take up a lot of disk space as they accumulate over time, and automatically searching for them is a huge advantage. On some specific configurations that have become a lot clogged up over several years, the size of all these leftovers can range from a few hundred megabytes to a few tens of gigabytes, so it can be very worthwhile to clean them out thoroughly.
  72.  
  73. However, only files and folders can have a significant size on the system, as registry keys and values have a negligible size.
  74.  
  75. Furthermore, these useless and obsolete items may contain information linked to the trial period or settings of any software, and finding them would allow you to completely and permanently uninstall these old pieces of software.
  76.  
  77.  
  78. Will this tool speed up Windows?
  79.  
  80. Technically, it won't make any significant difference, except on very full hard disks, which can initially slow down the system. Typically, for recent configurations equipped with flash hard disks (the famous SSDs), this script won't accelerate anything at all, but it could potentially free up a lot of unnecessarily occupied space and complete the uninstallation of old software.
  81.  
  82.  
  83. When did you create this script?
  84.  
  85. I've been working very steadily on this script for over 4 months now, but it's worth noting that it's a project I started in June 2021. At the time, I quickly put it aside for another big project (the famous WinExport 😉) because it was pretty slow and worked rather roughly knowing that it was only a prototype, so it didn't keep me busy for very long at that point.
  86. But last February, I came across it again and I realized that its ultimate purpose was extremely useful and innovative, so I went back to it in earnest to improve it in depth and make it much safer and more efficient.
  87.  
  88.  
  89. That's great, your script detected a lot of leftovers on my PC, but how do I delete them now?
  90.  
  91. For the moment, this isn't possible as the project is only in beta, and the detection algorithms aren't yet sophisticated enough to find only safe items to delete. Indeed, the leftovers of uninstalled software can easily get mixed up with items used by your favorite software and games, such as their respective settings and data, the various components they have installed automatically, or the drivers of your external devices.
  92.  
  93. In any case, it's crucial to scrupulously check each item found to make sure you're not deleting important data such as any settings or game saves. If you have any doubts about an item, feel free to check its contents to make sure it's not linked to any software or game you're using.
  94.  
  95. In the meantime, feel free to consult the "How to contribute" section to speed things up and help me create a robust and safe-to-use project. ;)
  96.  
  97.  
  98. Acknowledgments:
  99. ----------------
  100. Many thanks to all the following people for their incredible help in generously testing and improving this project:
  101. - spel
  102. - Nakyto
  103. - William
  104. - Dalsk music
  105. - copy
  106. - !mrane
  107. - Weiss
  108. - Mithrandir
  109. - Bonnet
  110.  
  111. A big thank you also to HiTech and mklement0 on Stack Overflow for their exceptional replies on technical questions such as the parsing of special characters or the coding of complex PowerShell algorithms:
  112. https://stackoverflow.com/a/69576835
  113. https://stackoverflow.com/a/74131513
  114. https://stackoverflow.com/a/49060341
  115.  
  116. Last revised on July 8 at 9 pm.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement