|
CCleaner Beginner's Guide |
|
winapp2.ini
How to add your own program to CCleaner.
You will need to open Notepad.
Paste this into Notepad:
; Application Cleaning file
;
; Notes
; ---------------------------------------
; LangSecRef
; 3021 = Applications
; 3022 =
Internet
; 3023 = Multimedia
; 3024 = Utilities
; 3025 = Windows
Now Save As, in the CCleaner Folder, Save as type: All Files, now Filename:
winapp2.ini, and click on Save. Now you have a blank cleaning .ini file to begin
with.
Ok, let’s look at an entry. (This entry can be found in winapp.ini).
[Remote Desktop]
LangSecRef=3025
Detect=HKCU\Software\Microsoft\Terminal Server Client
Default=True
FileKey1=%userprofile%\Local Settings\Application Data\Microsoft\Terminal Server
Client\Cache|*.*
RegKey1=HKCU\Software\Microsoft\Terminal Server Client\Default
Now, let’s break it down.
[Remote Desktop] Just put whatever name you want in [ ].
LangSecRef=3025
3021 =
Applications
3022 = Internet
3023 = Multimedia
3024 =
Utilities
3025 = Windows
In order find the registry path for the the program you want to add. Click on
Start, Run, and type regedit. (Administrator access required)
Detect=HKCU\Software\Microsoft\Terminal Server Client
HKCU - HKEY_CURRENT_USER
HKLM - HKEY_LOCAL_MACHINE
HKU - HKEY_USERS
This will detect if the program is installed or not.
Most programs will be in HKCU, but every now and then. It will be in HKLM.
To find the program you want to add, go to either HKCU\Software or HKLM\Software. Usually the program path will be the company name of who made the program.
If is a program made by Microsoft, it will be
HKCU\Software\Microsoft or HKLM\Software\Microsoft
If you need to Detect a program that is installed in a folder use:
DetectFile=
Example: DetectFile=%ProgramFiles%\CCleaner\ccleaner.exe
Default=True
True - Checked when you start CCleaner.
False - Unchecked when you start CCleaner.
FileKey - Located in a folder. Must start with 1 and then count up.
FileKey1=%userprofile%\Local Settings\Application Data\Microsoft\Terminal Server
Client\Cache|*.*
Parameters
The parameters are basic environment variables in Microsoft Windows.
Managing Environment Variables & System Variables
You must be an administrator to modify a system environment variable. System environment variables are defined by Windows and apply to all computer users. Changes to the system environment are written to the registry, and usually require a restart to become effective.
User Variables for User Name
Any user can add, modify, or remove a user
environment variable. These variables are established by Windows XP Setup, by
some programs, and by users. The changes are written to the registry, and are
usually effective immediately. However, after a change to user environment
variables is made, any open software programs should be restarted to force them
to read the new registry values. The common reason to add variables is to
provide data that is required for variables that you want to use in scripts.
To view or change environment variables:
| 1. | Right-click My Computer, and then click Properties. | ||||||
| 2. | Click the Advanced tab. | ||||||
| 3. | Click Environment variables. | ||||||
| 4. | Click one the following
options, for either a user or a system variable:
|
%userprofile% - Current user. Located in Documents and Settings.
%ProgramFiles% - Program Files. Example: C:\Program Files
%windir% - WINDOWS folder.
%rootdir% - Default drive. Example: C:\
%appdata% - Example: C:\Documents and Settings\<UserName>\Application Data
Non-English versions of Microsoft Windows:
Instead of using %appdata%, you would use %LocalAppData% or %CommonAppData%.
| - means you want to clean something in that folder.
*.* - means delete every file in that folder.
|RECURSE - will delete subfolders and everything with them. Must be followed
after *.*. Example: %ProgramFiles%\Yahoo!\Messenger\Profiles|*.*|RECURSE
|REMOVESELF – will delete folder and everything in it. Must be followed after
*.*. Example: %ProgramFiles%\Yahoo!\Messenger\Profiles|*.*|REMOVESELF
*.extension will clean any file in that folder with that extension. example:
*.log
You can also just clean certain files. Just add the file name and extension,
example: deletelog.txt
RegKey - Located in the registry. Must start with 1 and then count up.
RegKey1=HKCU\Software\Microsoft\Terminal Server Client\Default
HKCU - HKEY_CURRENT_USER
HKLM - HKEY_LOCAL_MACHINE
HKU - HKEY_USERS
This will delete anything located in the Default Folder.
Parameters:
| - means you want to clean something in that folder.
Example: Default|RegistryFile
VBScripting
VBScript support will allow you to add entries to ini files.
ScriptKey1=
It is recommended to have the scripts in the CCleaner folder.
Example: ScriptKey1=test.vbs will target the vbs file in the CCleaner directory.
If you want scripts in other folders other than the CCleaner directory, you will
have to list the full path.
PARAMETERS will not work in ScriptKey!
winapp2.ini Entries
There is a forum thread with lots of entries for winapp2.ini, which was created by users of the forum. It can be found here.
| Copyright © 2005-2008 Piriform Ltd. |