Placeholder Variable for "My Documents"

Is there a predefined placeholder (like %appdata%) for the "My Documents" folder? I know, I could define an environment variable myself. But for %appdata% and %ProgramFiles% there are none defined either, so is CCleaner defining them elsewhere?

Also I found some entries in winapp.ini like "FileKey1=%userprofile%\Local Settings\Application Data\..." which are not found on a non-english windows, whereas "FileKey1=%appdata%\..." would be found alright. So those entries simply don't work on non-english windows.

%UserProfile%\My Documents

or Vista

%userprofile%\documents

%UserProfile%\My Documents

%UserProfile% seems to point always to ..\Documents and Settings\<UserName>\

But one might have moved the "My Documents" elsewhere. In this case, do I have to hard-code the location?

There is a registry-key HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Personal which specifies the real location of My Documents. This could be read by CCleaner and be adressed by some %MyDocs% variable in the winapp2.ini.

%UserProfile% seems to point always to ..\Documents and Settings\<UserName>\

But one might have moved the "My Documents" elsewhere. In this case, do I have to hard-code the location?

Another possibility is to move "My Documents" from elsewhere and back to where it belongs !!!

I remember a long series of posts in one thread on some forum.

It started with a complaint about lack of privacy - other users in other profiles could see all his private stuff in his "My Documents".

It ended when it was discovered that he had 'moved the "My Documents" elsewhere',

and in his case "elsewhere" was outside his profile - hence everyone had full access.

A "perfect" new O.S. installation, with all folders where Microsoft intended, still has "Gotchas" for the unwary.

Things can get worse when folders get shifted to the "wrong" places.

I suspect many non-Microsoft applications (e.g. CCleaner) might get broken if "My Documents" is in the wrong place.

Regards

Alan

Another possibility is to move "My Documents" from elsewhere and back to where it belongs !!!

It started with a complaint about lack of privacy - other users in other profiles could see all his private stuff in his "My Documents".

It ended when it was discovered that he had 'moved the "My Documents" elsewhere',

and in his case "elsewhere" was outside his profile - hence everyone had full access.

A "perfect" new O.S. installation, with all folders where Microsoft intended, still has "Gotchas" for the unwary.

Things can get worse when folders get shifted to the "wrong" places.

I suspect many non-Microsoft applications (e.g. CCleaner) might get broken if "My Documents" is in the wrong place.

Well, the question where My Documents "belongs" is in the eye of the beholder, in fact. I, for instance, don't like my data files being burried somewhere in the depths of the system partition but rather on a different drive. In case of a complete OS crash I can just reinstall Windows and don't have to bother to first rescue my data files from the disk. If I don't want other users to have access to my data, I just remove all the access rights for others from my data disk.

As for the original problem (in case, someone else is having this problem): The easiest solution is to define an environment variable in the system panel specifying the location of My Documents and then refer to it in the winapp2.ini. Then, in case one relocates My Documents again, one has to modify the env-variable accordingly.

In this case, do I have to hard-code the location?

You may be able to do that giving CCleaner the actual path, for example:

D:\My Documents

At one time I thought I posted a request for CC to get system variables from the registry. But cant find the thread. For some years I have been running XP and now Vista with all user shell folders located on a separate partition. Makes backup(s) and restore a breeze since only Windows is on the system partition.

Anyway. It is required to hard code the paths. Which is also the case if you install some programs to a location other than the default. I asked about this not too long ago, but it seems no one really understood what I was trying to achieve. http://forum.piriform.com/index.php?showtopic=16852

At one time I thought I posted a request for CC to get system variables from the registry. But cant find the thread. For some years I have been running XP and now Vista with all user shell folders located on a separate partition. Makes backup(s) and restore a breeze since only Windows is on the system partition.

Anyway. It is required to hard code the paths. Which is also the case if you install some programs to a location other than the default. I asked about this not too long ago, but it seems no one really understood what I was trying to achieve. http://forum.piriform.com/index.php?showtopic=16852

This was exactly my problem. I too install my applications in a different folder than the "Program Files" because there is so much Windows-garbage and other applications-junk which is installed without notice. Same with "My Documents". And all these paths are written to the registry, so in principle it would be possible for CC to get them. The "My Documents" location is in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Personal and the install folders of applications must be some where in their uninstall infos. It's just that CC simply doesn't do that. So this would be a feater request.

Hope some devs agree with me...

regards,

Mike