-
-
Notifications
You must be signed in to change notification settings - Fork 5
Using the additional cleaners feature
The additional cleaners feature (introduced in version 8.0-stable) allows you to add your own custom shell commands (Windows Command Prompt command lines) to be executed along with other cleaning options (if selected) during a cleaning session.
You have to modify the file addsclean.ini in the directory that contains the Temp_Cleaner GUI executable and all of its related files (in some builds this file can be found under the _internal folder)
- Open the folder where Temp_Cleaner GUI is installed into (for example:
C:\Program Files\Temp_Cleaner GUI) - See if you can find the file
addsclean.iniin that folder, if not, and you can see a folder named_internal, then it will be there (so you should navigate to that folder). - Open the file
addsclean.iniusing your favorite code editor (Please note that you may need to run your code editor app as Administrator to be able to do so) - The inside of the file should be something like that:
[ModifyAddsCleaners]
Name=Open Notepad to modify the additional cleaners file
Command=notepad.exe addsclean.iniLet me explain the syntax of an ini configuration file to you first so you can be familiar with the concepts we will be using for the rest of this document.
This is an example of an ini file:
[Employee1]
Name=John
ID=235621456415
[Company]
Name=My Company LLC
ID=235621454415
isRegistered=True
[HR]
Name=Manuel
ID=211121456415
isActive=TrueEvery ini file is divided into sections, with each section having their own keys, and each key having its own value.
Like in the example above: [Employee1], [Company], and [HR] are called sections.
and each = (equal sign) represents a key-value pair in each one of these sections, while keeping in mind that ONLY the key-value pairs under the section declaration are a part of that section.
✅ So we can say that:
[Employee1]
Name=John
ID=235621456415is a section for an employee, who has his Name as "John" (specified using the key Name with the value John), and its unique ID as 235621456415 (specified using the key ID with the value of 235621456415)
❌ But we CAN'T say that:
[Employee1]
Name=John
ID=235621456415
[Company]The key Name, with the value John is a part of the [Company] section, because when we declare a new section (using square brackets and some name for a section, like this [Company]), the lines written after that section declaration become a part of that section.
I think you are starting to get what I'm explain, aren't you?
This is the only rule you should follow when naming sections in the INI files:
-
DO NOT use special characters, spaces, dots, or commas, also at all costs, avoid using Unicode characters (like Arabic letters, Chinese letters, etc.)
✅
[MySection], ❌[My Section], ❌[My.Section], ❌[$MyCleaningOption2&]
Now that you are familiar with the syntax of INI configuration files, we can continue with the remaining steps.
-
Create (or modify) existing sections to represent a short descriptive name for the cleaning option you want to add (for example
[TempOfMyProgram], or[GPUCacheOfMyProgram]) -
Add the key
Nameand set its value to be the text that will be displayed for your cleaning option in Temp_Cleaner GUI's window for example:Name=GPU Cache of My Program -
Add the key
Commandand set its value to be the full command line that will be executed when the cleaning option is enabled and a cleaning process is running. for example:Command=del /F /S /Q "C:\Program Files\MyProgram\GPUCache"
so our section should be like this:
[GPUCacheOfMyProgram]
Name=GPU Cache of My Program
Command=del /F /S /Q "C:\Program Files\MyProgram\GPUCache"Add these lines to the addsclean.ini file, then restart Temp_Cleaner GUI and your new cleaning option with the name GPU Cache of my Program will be visible in the Additional Cleaning Options section inside the Temp_Cleaner GUI's window.
Temp_Cleaner GUI's official GitHub Wiki - Download Temp_Cleaner GUI - Donate - Website