Jump to content

New Envrionment Variable


Winapp2.ini

Recommended Posts

  • Moderators

Neither, he is asking the developers to variablize documents in order to make cleaning locations that are in the documents folder cross Version compatible.

 

It is the same as when they added %locallowappdata% which does not exist in windows

 

ADVICE FOR USING CCleaner'S REGISTRY INTEGRITY SECTION

DON'T JUST CLEAN EVERYTHING THAT'S CHECKED OFF.

Do your Registry Cleaning in small bits (at the very least Check-mark by Check-mark)

ALWAYS BACKUP THE ENTRY, YOU NEVER KNOW WHAT YOU'LL BREAK IF YOU DON'T.

Support at https://support.ccleaner.com/s/?language=en_US

Pro users file a PRIORITY SUPPORT via email support@ccleaner.com

Link to comment
Share on other sites

+1 on that.

 

I was also hinting at probably including Windows? "special folders" (CSIDL_xxx, or nowadays KNOWNFOLDERID_xxx) in another post. There?s a bunch of them, and just sometimes it would come in very handy to be able to use them for cleansing (like in winapp2.ini).

 

Having those evaluated and available inside CCleaner would avoid having to hard-code things like "My Documents" and having to change these manually for different Windows versions and/or locales.

 

My suggestion would be these:

 

1. VARIABLES THAT MAKE SENSE WITH CCLEANER (ONE SHOULD USE THESE)

 

%CDBurning% (CSIDL_CDBURN_AREA, 0x3b)

%CommonFavorites% (CSIDL_COMMON_FAVORITES, 0x1f)

%CommonOEMLinks% (CSIDL_COMMON_OEM_LINKS, 0x3a)

%CommonStartup% (CSIDL_COMMON_STARTUP, 0x18)

%Cookies% (CSIDL_COOKIES, 0x21)

%DesktopDirectory% (CSIDL_DESKTOPDIRECTORY, 0x10)

%Favorites% (CSIDL_FAVORITES, 0x06)

%History% (CSIDL_HISTORY, 0x22)

%InternetCache% (CSIDL_INTERNET_CACHE, 0x20)

%LocalAppData% (CSIDL_LOCAL_APPDATA, 0x1c)

%Music% (CSIDL_MYMUSIC, 0x0d)

%Personal% (CSIDL_PERSONAL, 0x05)

%Pictures% (CSIDL_MYPICTURES, 0x27)

%Profile% (CSIDL_PROFILE, 0x28)

%ProgramData% (CSIDL_COMMON_APPDATA, 0x23)

%ProgramFiles% (CSIDL_PROGRAM_FILES, 0x26)

%ProgramFilesCommon% (CSIDL_PROGRAM_FILES_COMMON, 0x2b)

%ProgramFilesCommonX86% (CSIDL_PROGRAM_FILES_COMMONX86, 0x2c)

%ProgramFilesX86% (CSIDL_PROGRAM_FILESX86, 0x2a)

%PublicDesktop% (CSIDL_COMMON_DESKTOPDIRECTORY, 0x19)

%PublicDocuments% (CSIDL_COMMON_DOCUMENTS, 0x2e)

%PublicMusic% (CSIDL_COMMON_MUSIC, 0x35)

%PublicPictures% (CSIDL_COMMON_PICTURES, 0x36)

%PublicVideos% (CSIDL_COMMON_VIDEO, 0x37)

%Recent% (CSIDL_RECENT, 0x08)

%RoamingAppData% (CSIDL_APPDATA, 0x1a)

%Startup% (CSIDL_STARTUP, 0x07)

%System% (CSIDL_SYSTEM, 0x25)

%SystemX86% (CSIDL_SYSTEMX86, 0x29)

%Videos% (CSIDL_MYVIDEO, 0x0e)

%Windows% (CSIDL_WINDOWS, 0x24)

 

2. VARIABLES THAT CAN BE USEFUL FOR SPECIAL REQUIREMENTS

 

%AdminTools% (CSIDL_ADMINTOOLS, 0x30)

%AltStartup% (CSIDL_ALTSTARTUP, 0x1d, obsolete, use "Startup")

%CommonAdminTools% (CSIDL_COMMON_ADMINTOOLS, 0x2f)

%CommonAltStartup% (CSIDL_COMMON_ALTSTARTUP, 0x1e, obsolete, use "CommonStartup")

%CommonPrograms% (CSIDL_COMMON_PROGRAMS, 0x17)

%CommonStartMenu% (CSIDL_COMMON_STARTMENU, 0x16)

%CommonTemplates% (CSIDL_COMMON_TEMPLATES, 0x2d)

%Desktop% (CSIDL_DESKTOP, 0x00)

%Documents% (CSIDL_MYDOCUMENTS, 0x0c)

%Fonts% (CSIDL_FONTS, 0x14)

%LocalizedResourcesDir% (CSIDL_RESOURCES_LOCALIZED, 0x39)

%NetHood% (CSIDL_NETHOOD, 0x13)

%PrintHood% (CSIDL_PRINTHOOD, 0x1b)

%Programs% (CSIDL_PROGRAMS, 0x02)

%ResourceDir% (CSIDL_RESOURCES, 0x38)

%SendTo% (CSIDL_SENDTO, 0x09)

%StartMenu% (CSIDL_STARTMENU, 0x0b)

%Templates% (CSIDL_TEMPLATES, 0x15)

 

3. VARIABLES THAT ONLY RETURN CLSIDs (MIGHT NOT BE USEFUL WITH CCLEANER)

 

%ComputerFolder% (CSIDL_DRIVES, 0x11)

%ComputersNearMe% (CSIDL_COMPUTERSNEARME, 0x3d)

%ConnectionsFolder% (CSIDL_CONNECTIONS, 0x31)

%ControlPanelFolder% (CSIDL_CONTROLS, 0x03)

%InternetFolder% (CSIDL_INTERNET, 0x01)

%Network% (CSIDL_NETWORK, 0x12)

%PrintersFolder% (CSIDL_PRINTERS, 0x04)

%RecycleBinFolder% (CSIDL_BITBUCKET, 0x0a)

 

 

At least these are the ones I use. (And I hope the developers read these threads. The CSIDLs (KNOWNFOLDERIDs nowadays) are actually easy to obtain from almost all Windows versions since Windows 2000.) Hint: Use the functions but never the registry keys ? the latter aren?t supported, and anyway only set up after first use of a special folder.

Link to comment
Share on other sites

Cheers for the answer, Winapp2.ini!

 

Up to (and including) Vista, the above should be sufficient and give usable results. The same holds for Win7 (as far as CSIDL goes), but from a programming point of view, I?d use an OS version check, and if we?re on Vista (or above), use KNOWNFOLDERIDs in addition, to get all the extra ones not (yet) addressed by my stuff, like, for instance

 

LocalAppDataLow

PhotoAlbums

Ringtones

PublicRingtones

Games

GameTasks

RecordedTV

RecordedTVLibrary

SavedGames

SavedSearches

 

Just to mention a few right from the memory ?

 

The only remaining (and increasingly important) point to address would be how to prevent CCleaner from actually using paths with EMPTY substitution, i.e., using a variable in winapp2.ini that returns an empty result (say, %LocalLowAppData% on Windows XP). If those got used, like in

 

FileKey1=%LocalLowAppData%\MyApp\SomeStuff|*.*|RECURSE

 

CCleaner might otherwise inappropriately return a path of

 

\MyApp\SomeStuff\*.*

 

which could lead to all sorts of odd errors, of course.

 

Just imagine

 

FileKey1=%LocalLowAppData%|*.*|RECURSE

 

being "expanded" to

 

\*.*

 

Aaaaargh!

 

Then again, I assume the programmers do variable substitution in some part of CCleaner and would be able to detect an empty value. And probably just not allow this to happen (say, by ignoring the path in this case, not doing anything on it, and continue with the next FileKey, if any).

 

Oh well. 'Nuff said. B)

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.