This page focuses on environment variables and system variables, explains what they are, how they relate to CCleaner INI files, and how to view or modify them. It also contains some coding information. If you are unfamiliar with coding, this page may not be suitable for you.
To skip to the main instructions, go to View or change environment variables in Windows 10 below.
Note: The contents of this page are aimed at advanced users of our app and may require a certain level of technical knowledge and expertise.
What are the environment or system variables?
An environment or system variable is a shortcut that points to a specific folder.
Using environment or system variables with CCleaner INI files:
You can use standard Windows environment variables and system variables in CCleaner's INI files.
For example, %APPDATA% points to where you currently store your application data. By default, this is in C:\Users\[user name]\AppData\Roaming.
The above is convenient if you plan to share your INI files or use them on multiple computers; you don't have to know all the custom Windows folder settings that exist (in advance).
Common system variables in Windows:
Note: Please treat each bullet point (below) as individual instructions. Lines of code do not blend from one bullet point to the other.
- %userprofile% - This points to the Documents and Settings folder, for example, C:\Documents and Settings\Administrator
- %ProgramFiles% - This points to the Program Files location for Windows, for example, C:\Program Files
- %windir% - This points to the \WINDOWS folder, for example, C:\Windows
- %rootdir% - This points to the root folder of the drive where Windows is installed, for example, C:\
- %appdata% - This directs you to your custom application settings, for example, C:\Users\[user name]\AppData\Roaming
- %localappdata% - This points to the custom application settings that can't move from computer to computer with a specific user profile, for example, C:\Users\[user name]\AppData\Local
- %systemdrive% - This points to the drive where Windows is installed. Example: C:
What are 'parameters'?
Parameters are basic environment variables in Microsoft Windows.
Managing the environment variables and system variables:
To modify a system environment variable, you must be an administrator. Microsoft Windows defines the system environment variables, and they apply to all computer users (including you). Changes to the system environment also reflect in the Windows Registry. Usually, you need to restart your computer for changes to them to become effective.
User variables for a Windows user name:
Any user can add, modify, or remove a user environment variable. Some users and programs establish these in the Windows Setup. These changes also reflect in the Windows Registry and usually become effective immediately. When user environment variables change, restart all your software or programs to make sure they sync with the new Windows Registry values. A common reason for adding variables is to provide data for variables you want to use in scripts.
View or change environment variables in Windows 10:
- Click Start, then Settings
- Click System, then go to the About category. Within the About category, scroll down and click System Info.
- Doing this opens the System portion of the Control Panel. Within this panel, click Advanced system settings, then Environment Variables.
- Click one of the following options for either a user or a system variable:
- Click New to add a new variable name and value.
- Click an existing variable, and then click Edit to change its name or value.
- Click an existing variable, and then click Delete to remove it.
Note: The process is similar in older versions of Windows, but we suggest you consult your system manual or information from your manufacturer for more details.