Jump to content

What's the %ProgramData% variable in winapp.ini?


Recommended Posts

Could it be:

XP: Documents and Settings\All Users

Vista: ProgramData


XP: Documents and Settings\All Users\Application Data

Vista: ProgramData


XP: %CommonAppData%

Vista/7: %ProgramData%


Don't have XP machine here so can't test these.

%ProgramData% opens "C:\ProgramData" in Win7.

Link to comment
Share on other sites

Regardless of all Piriform products,

%ProgramData% is an environmental variable in Vista and Windows 7.


This variable is missing from XP Home


I think years ago I had to especially define the environment variable %ALLUSERSPROFILE% as C:\Documents and Settings\All Users,

and that allowed me to write the SAME *.bat script to use the correct folders regardless of the changes from XP to Windows 7.


A recent CCleaner enhancement probably allows WinApp?.ini to similarly use %ProgramData% under XP as well as Windows 7


You will find many more subtle variations at



The top of the table is especially relevant

Unfortunately what I paste as 3 lines including a header is only displayed as one line.



Variable Windows XP Windows Vista/7 %ALLUSERSPROFILE% and %PROGRAMDATA% C:\Documents and Settings\All Users C:\ProgramData %APPDATA% C:\Documents and Settings\{username}\Application Data C:\Users\{username}\AppData\Roaming

Link to comment
Share on other sites

It looks like CCleaner is not able to correctly work with this variable on Windows XP.


There is e.g. this line vor avast 5 in the embedded winapp.ini

FileKey2=%ProgramData%\Alwil Software\Avast5\log|*.*


If %ProgramData% ist really equal %ALLUSERSPROFILE% then this path doesn't exist on my machine.

The path on my machine is %COMMONAPPDATA%\Alwil Software\Avast5\log|*.*

(%ALLUSERSPROFILE% is not the same path as %COMMONAPPDATA%, if I am correct. %COMMONAPPDATA% is the folder for application data in the %ALLUSERSPROFILE% directory)


After running CCleaner all files in this folder still exist. Several of these files are blocked by avast and cannot be deleted with the running virus shield anyway.


Another line for avast 6 is

FileKey1=%ProgramData%\Avast Software\Avast\log|*.*

That doesn't exist here either. There's only a path %COMMONAPPDATA%\avast


Looks like the avast entries don't work at least on my XP machine.


(Thank God) the %ProgramData% variable is only used in the avast entries of the embedded winapp.ini.

Link to comment
Share on other sites

Unfortunately Windows chaos rules supreme


Applications may be installed either for a specific user or for all users,

and on XP that results in their configuration data files being held somewhere in

C:\Documents and Settings\{username}\...


C:\Documents and Settings\All Users\...


on Windows 7 it seems to be

C:\Documents and Settings\{username}\Application Data



or possibly



As I already indicated, you have to define %PROGRAMDATA% (or %ALLUSERSPROFILE%) if you want to use them under XP.

I guess that Piriform MAY have defined them as part of the environment under which CCleaner is running,

in which case the hopefully will work when you specify them as part of an INCLUDE or in a WinApp?.ini script,

but they will not exist for other applications under XP.


It took a long time but now I can stipulate %USERPROFILE% as part of an INCLUDE and it works for XP and W7.

For a very long time this has ALWAYS been a variable AVAILABLE to all applications under XP and W7,

but only recently does it work for INCLUDE.


Perhaps there is still Work In Progress.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.