Jump to content

Getting Special Folders right on ALL systems (even foreign-language)


Moonbase

Recommended Posts

The Good, the Bad, and the Ugly

 

Now Windows has evolved over some decades. It has become quite a complicated operating system, and has a bunch of features, like localization. Sadly enough, to do "everything right", you almost need to be a professional programmer. Then there?s a lot of nice freeware, shareware and open source software out there. Often made with lots of good will, but not taking each and every situation into account. Or trying to help with some add-ons, and only thinking about the own country (the U.S., mostly).

 

But Windows? user base out there is ENORMOUS. And even good software tends to break, or work erratically, often due to minor oversights. Or just not sitting in Redmond and have all the documentation available.

 

Just think about our beloved "My Documents" folder, often containing even more stuff, like "My Pictures", "My Music", and "My Videos". It?s in English, so it?s universal, right? So where?s the harm in hard-coding something like

 

"C:\Documents and Settings\"

plus the username, plus

"\Local Settings\Application Data"

 

into an application?

 

It will break. Or is already broken. The above example is from an English-language Windows XP system. On a German-language Windows XP, this would look like

 

C:\Dokumente und Einstellungen\username\Lokale Einstellungen\Anwendungsdaten

 

Or on a Spanish system

 

C:\Documents and Settings\username\Configuraci?n local\Datos de programa

 

Or even

 

C:\Users\username\AppData\Local

 

if you?re running Windows 7 with the English locale active. See what I mean?

 

So, if you?re a programmer, DON?T?USE HARD-CODED STRINGS! If anyhow possible, let the operating system give you the correct names, paths and values. You will enjoy less bug reports, less problems, and your software will have lots and lots of happy users. Even in Germany, or Russia, or Madagascar ... anywhere.

 


 

Trying to make things a little easier

 

Things are often not as easy as they seem. I?d LOVE to see CCleaner?s programmer implement all these features into his software, so we all could get rid of things like hard-coded "My Documents" in, say "winapp2.ini".

 

To help out for a while, I decided to write a small helper module in VBScript (yuk!), since VBScript is supported by CCleaner and many, if not most, users will have the Windows Scripting Host enabled.

 

CCleaner CAN use so-called "Environment variables" (known by many from the old DOS batch file programming times), so we can set up most oft the "important" so-called "Windows Special Folders" as environment variables. The nice side-effect is that you can also use them in your own scripts or batch files later on. Or in CCleaner, preferably in the famous "winapp2.ini", which is a file you can edit yourself (or download from Piriform?s forums), and which helps to specify additional cleansing actions.

 


 

I use it ? will you?

 

I?m switching systems a lot, and this really helped me getting along. ONE thorough change of "winapp2.ini", using the new variables, and ready to go on whatever system in whatever language!

 

I?d be glad if many of you would try this out and give me feedback. For the time being, it seemed the easiest solution to me. And the best thing is ? it actually works.

 


 

What do you get?

 

I attach the VB Script, the accompanying "winsys2.ini" file, and the documentation to this post for anyone to try (or even improve). Just unzip to your CCleaner program folder and read "ReadMe.SetEnvVars.txt".

 

Hint: If you?re already using a "winsys2.ini" file, don?t overwrite that but instead merge yours and mine. If you don?t know how to do that, just keep using yours and don?t use mine. It?s not essential to the functioning of my add-on, it just adds an extra menu entry in CCleaner.

 

Hint: "ReadMe.SetEnvVars.txt" is a Unicode (UTF-16LE) text file. You should open it with a Unicode-capable Editor (Windows Editor is fine), and set it to wrap long lines.

 

Enjoy ? and let me know!

 

EDIT 2010-12-04: Updated documentation to include a list and description for all variables. Sorted by categories "Variables that make sense with CCleaner (you should use these)", "Variables that are useful for special requirements", and "Variables that only return CLSIDs".

 

files removed as direct downloads from users are not allowed on the forum

Link to comment
Share on other sites

files removed as direct downloads from users are not allowed on the forum

Oops, seems I must have missed a forum rule. Sorry.

 

Any suggestions where I should put the files? Would a link be okay if I store them somewhere on my web space?

 

And what was wrong with my signature? It also has been deleted without notice. (It had small and very decent text, no images, scripting or odd links, and a link to my homepage in two languages.)

 

I just wanted to be helpful, offering something probably useful for many CCleaner users (and several days? work) for everybody for free. Now I feel just a little disappointed.

 

But maybe we can sort this out. Or you just have a look at the code and implement the functionality into CCleaner, which I?d also much appreciate. It?s a snap, really. And we wouldn?t have to use bad, old environment variables ?

Link to comment
Share on other sites

I think I like what you are offering, but you are doing it wrong.

 

You can upload a GIF or ZIP file, but NOT an EXE file.

 

I believe it is normal on most forums that text and images are safe and unlikely to change system files,

whilst EXE and VBS etc are blocked because a clumsy click on the download might cause unexpected disaster.

 

Try wrapping your VBS etc in a ZIP.

Alternatively there are file sharing sites you could link to.

 

Regards

Alan

Link to comment
Share on other sites

I think I like what you are offering, but you are doing it wrong. [?]

 

Alan, I actually uploaded two files: 1. The documentation as a .txt file, and 2. the complete .zip archive containing the text file, a winsys2.ini, and the .vbs script.

 

Oh well, let?s see if the moderators here come back with some statement and probably allow a link to my homepage again.

 

Sorry for the inconvenience.

Link to comment
Share on other sites

  • Moderators

yeah, the removal was probably due to the vbs file (I'm not the remover, but that's why I would remove it). vbs files can be dangerous, not to say that your's is but on the whole better safe than sorry.

Couple suggestions

1) place the text of the VBS in a code tag and let others compile it (copy paste into text file save as *.vbs) or place it on your website with a link.

 

as to the point of your thread,

I'm suprised that the Lang file doesn't already translate the locations. Obviously the ones that are enviromental variables should already be translated (%appdata% %userprofile% %localappdata%). So the examples you give:

C:\Documents and Settings\"

plus the username, plus

"\Local Settings\Application Data"

should already translate

for instance the word "document" does occurs not even once in neither the Detect nor delete keys in CCleaner's default cleaning. instead %userprofile% is "C:\Documents and Settings\{username}" and %localappdata% is "C:\Documents and Settings\{username}\Local Settings\Application Data"

 

Now it could be that since %localappdata% is a CCleaner variable and not a windows one, that the developers need to query Microsoft for all the language strings for C:\Documents and Settings\{username}\Local Settings\Application Data, C:\Users\{username}\Appdata\Local and C:\Users\{username}\Appdata\Low (%locallowappdata%). It may be that they have already done this I am not sure.

 

So really I'm not sure if this is really nessecary at all. That said, I do not have a localized windows install in another lang to test things out on, but many people around the world successfully run ccleaner with no issue so I would assume it really is not an issue. Perhaps you could point to a specific entry which is causing the concern for which you wrote this, well thought out and interesting, thread.

 

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

Thanks for the feedback, Nergal, much appreciated.

 

Re: lang files. I?d never think about system variables being "translated" in a LANG file, actually. There ARE "foreign" people that work with custom language settings. Myself, I?m (half) British and prefer using the applications set to "English", while working on a German-language Windows system.

 

I think an application should find the correct path, even in such a situation.

 

I think I?m not going to post the (long!) .vbs and (even longer!) documentation readme files here in the forum, it might be just a little too much (and I?d probably run into some "max length" restriction).

 

For people interested in the add-on, I advise to download the ZIP file, extract it, and open the VBS file in the editor of their choice BEFORE executing it. So everyone can study the code safely. Also, don?t forget to run a virus-scanner on the downloaded files. (Of course I checked them prior to uploading, but better play safe. Always.)

 

Here are the links:

LINKS REMOVED AGAIN - Nergal

Edited by Nergal
Links removed again
Link to comment
Share on other sites

  • Moderators

Moonbase you misunderstand. The Issue IS NOT that u=you used attachment. It is that you are linking to direct downloads. This is what is not allowed you need to make a page on your server and host the files from there.

 

Sorry to have to do this but once again I have removed the files

 

Again if you really want to post the vbs do it by pasting the TEXT of the vbs into code tags in the thread so users can compile it themselves.

 

You won't be asked again. Thank you and sorry for the inconvenience

 

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

Compile? A textual script? It is nothing compiled, just (scripting) TEXT.

I even put it on my own server, as requested.

 

Well, it seems I really don?t understand what you?re hinting at. What?s the difference of loading a piece of (VBScript) TEXT from a forum post or a file? BOTH can be studied before executing, code copied from a forum post might just be messed up more easily during copying. Things like the winapp2.ini file are also just text and available as attachment downloads.

 

Re.: "Better safe than sorry." Yes, I fully agree. That?s why I posted the vbs as readable code and even advise in the readme file to 1) run a virus scanner, and 2) check the code out in a text editor BEFORE executing anything from an unknown source.

 

[rant]

I must still be a bit too old-fashioned, always trying to help out and pointing people in the right direction for free. If that?s not wanted, I probably misunderstood the reason for this forum. But it?s okay with me and I won?t be wasting my time on this issue anymore. To me, it somehow feels a little like being in kindergarden again.

[/rant]

 

Sorry for the rant, folks. And thanks to all who took the time to evaluate and consider the little piece of "add-on", and even gave feedback. Really, I mean it. Unfortunately, I don?t have enough spare time right now to put up a full extra page on my site just for this (that?s why I posted it here in the first place).

 

Nergal: I respect your feedback (and the neutral tone of it), and I liked that you put your name next to the deletion remark. People should stand behind what they do. Just I?m a little more emotional, at times.

Link to comment
Share on other sites

If I'm not mistaken, this is what Nergal wants.

 

Winsys2,ini


; winsys2.ini -- CCleaner - System Cleaning file
; support for additional environment variables for winapp2.ini
; 2010-12-03 Rev 1000 Moonbase

[Global]
Revision=1000

;
; WARNING - DO NOT EDIT THIS FILE
; Copyright ?2010 Matthias C. Hormann (aka Moonbase). All Rights Reserved.
; This file and it's contents may not be copied or distributed
; without the express permission of the author.
;
; Notes
; ---------------------------------------
; LangSecRef
; 3001 = Internet Explorer
; 3002 = Windows Explorer
; 3003 = System
; 3004 = Advanced

;
; This will add some user environment variables to allow easy access
; to Windows' version- and language-specific special shell folders,
; for instance in 'winapp2.ini'.
;
; Example:
; The 'My Documents' folder (%PERSONAL%) would be something like
; C:\Dokumente und Einstellungen\Moonbase\Eigene Dateien
; on a German-language Windows XP system,
; C:\Documents and Settings\Moonbase\My Documents
; on an English-language Windows XP, and
; C:\Users\Moonbase\Documents
; on an English-language Windows 7 system.
;
; After running this addition once (and after every change of system folders)
; these can be easily accessed by using the variable %PERSONAL% in CCleaner!
; For further information, check the included VBS script 'SetEnvVars.vbs'.
;
; I still think this should better (and faster) be done in the application
; itself, because it creates a HUGE environment.
;
[Add Special Folder Name variables]
LangSecRef=3004
Default=True
ScriptKey1=SetEnvVars.vbs
Warning="This will add extra environment variables to your User Environment for later use in 'winapp2.ini'. This needs to be done only once (or if you changed Special Windows Folders). To correctly enable the newly added Special Folder Name variables, you may have to run CCleaner once, then restart it. (It doesn't hurt leaving this option enabled.)"
[/Code]

 

ReadMe.SetEnvVars.Txt

[Code]
ReadMe.SetEnvVars.txt -- CCleaner - Optional VBScript Module
Documentation for additional environment variables for winapp2.ini (and the like).
2010-12-03 Moonbase

*** This is a Unicode file (UTF-16LE). You can use "Editor" to display it. ***
*** IF YOU CAN?T READ THIS WELL, switch your editor to WRAP LONG LINES. ***

Copyright ?2010 Matthias C. Hormann (aka Moonbase). All Rights Reserved.
This file and it's contents may not be copied or distributed
without the express permission of the author.

---

CONTENTS

A. Instructions for the Impatient
B. The Good, the Bad, and the Ugly
C. Trying to make things a little easier
D. Using it from inside CCleaner
E. Using the new variables in "winapp2.ini"
F. Buy me a beer? Buy me a beer! ;-)
G. Still here? Wow. The List of Variables!

---

A. INSTRUCTIONS FOR THE IMPATIENT

1. Copy "SetEnvVars.vbs" and "winsys2.ini" into your CCleaner program folder.

2. Double-click and execute "SetEnvVars.vbs" at least once. (No harm will be done if it?s run more than one time.)

3. If you have your own "winapp2.ini" file, you may now modify it to use the extra, all-new, environment variables. And enjoy the extra functionality.

4. If you switch systems, or the system?s locale (language), run "SetEnvVars.vbs" again.

5. All this should work on Windows 2000, XP, Vista, and Seven. Maybe more ...

---

B. THE GOOD, THE BAD, AND THE UGLY

Now Windows has evolved over some decades. It has become quite a complicated operating system, and has a bunch of features, like localization. Sadly enough, to do "everything right", you almost need to be a professional programmer. Then there?s a lot of nice freeware, shareware and open source software out there. Often made with lots of good will, but not taking each and every situation into account. Or trying to help with some add-ons, and only thinking about the own country (the U.S., mostly).

But Windows? user base out there is ENORMOUS. And even good software tends to break, or work erratically, often due to minor oversights. Or just not sitting in Redmond and have all the documentation available.

Just think about our beloved "My Documents" folder, often containing even more stuff, like "My Pictures", "My Music", and "My Videos". It?s in English, so it?s universal, right? So where?s the harm in hard-coding something like

"C:\Documents and Settings\"
plus the username, plus
"\Local Settings\Application Data"

into an application?

It will break. Or is already broken. The above example is from an English-language Windows XP system. On a German-language Windows XP, this would look like

C:\Dokumente und Einstellungen\username\Lokale Einstellungen\Anwendungsdaten

Or on a Spanish system

C:\Documents and Settings\username\Configuraci?n local\Datos de programa

Or even

C:\Users\username\AppData\Local

if you?re running Windows 7 with the English locale active. See what I mean?

So, if you?re a programmer, DON?T USE HARD-CODED STRINGS! If anyhow possible, let the operating system give you the correct names, paths and values. You will enjoy less bug reports, less problems, and your software will have lots and lots of happy users. Even in Germany, or Russia, or Madagascar ... anywhere.

---

C. TRYING TO MAKE THINGS A LITTLE EASIER

Things are often not as easy as they seem. I?d LOVE to see CCleaner?s programmer implement all these features into his software, so we all could get rid of things like hard-coded "My Documents" in, say "winapp2.ini".

To help out for a while, I decided to write a small helper module in VBScript (yuk!), since VBScript is supported by CCleaner and many, if not most, users will have the Windows Scripting Host enabled.

CCleaner CAN use so-called "Environment variables" (known by many from the old DOS batch file programming times), so we can set up most oft the "important" so-called "Windows Special Folders" as environment variables. The nice side-effect is that you can also use them in your own scripts or batch files later on. Or in CCleaner, preferably in the famous "winapp2.ini", which is a file you can edit yourself (or download from Piriform?s forums), and which helps to specify additional cleansing actions.

We store most of the "well known" special places as variables in the "user" environment. These get stored in the registry (HKCU) and thus will survive a system restart. Since the variables are different for each Windows user, you?ll have to execute SetEnvVars.vbs under each Windows user account that you plan to run CCleaner under.

Using always the same variable names, we can be sure that CCleaner ? and your fine-tuned "winapp2.ini" ? will always point its cleansing activities at the right places. Independent of OS version or language!

As a bonus, you can always use the same environment variables in your batch files or other scripts. You know you can easily set them up again anytime using my "SetEnvVars.vbs".

You can even use the "special places" with Windows Explorer: Just try to enter the following examples into Windows Explorer?s address bar:

%Music% (jumps to your "My Music" folder)
%ControlPanelFolder% (shows your system control panel)
%ConnectionsFolder% (shows your connections)
%LocalAppData% (shows your application?s data on this machine)
%RoamingAppData% (shows the app data you can "take with you", i.e., in a domain)

Be aware that not each and every variable works on every system! My script should handle these situations gracefully, though.

If you want to peek around a little, feel free to open SetEnvVars.vbs in the editor of your choice and read all the comments inside. In line 19, you can also set the variable "debug" to TRUE and run the script again. It will pop up a message box stating what it is doing for each and every variable (about 56).

This might come in handy for Windows 8 ?

Enjoy! :-)

---

D. USING IT FROM INSIDE CCLEANER

If you?re not already using a "winsys2.ini" file, copy mine into your CCleaner program folder. It will add an extra menu entry called "Add Special Folder name variables" under "Advanced" on the "Windows" tab and enable it.

A warning pops up whenever you check the button "Add Special Folder name variables":

"This will add extra environment variables to your User Environment for later use in 'winapp2.ini'. This needs to be done only once (or if you changed Special Windows Folders). To correctly enable the newly added Special Folder Name variables, you may have to run CCleaner once, then restart it. (It doesn't hurt leaving this option enabled.)"

This is just to remind you that things might have changed, and the SetEnvVars.vbs script needs to be run at least once before the extra variables can be used.

If you have run SetEnvVars.vbs BEFORE you started CCleaner, you do not need to run it again from within CCleaner. If you do, it won?t hurt.

---

E. USING THE NEW VARIABLES IN "winapp2.ini"

Let?s take a practical example using the "winapp2.ini" file you can download from Piriform?s forum at

http://forum.piriform.com/index.php?showtopic=29438
(Topic "Get the Latest Winapp2.ini File")

Open the file in your favorite editor, and search for this section:

[CDex*]
LangSecRef=3024
Detect=HKLM\SOFTWARE\CDex
Default=False
FileKey1=%UserProfile%\My Documents\My Music\CDDB|*.txt

We can easily see that this entry wouldn?t work on a German Windows XP, or on Windows 7. Depending on the system, the above FileKey1 expands to:

English Windows XP (okay):
C:\Documents and Settings\username\My Documents\My Music\CDDB\*.txt

German Windows XP (BAD):
C:\Dokumente und Einstellungen\username\My Documents\My Music\CDDB\*.txt
The correct path would be:
C:\Dokumente und Einstellungen\username\Eigene Dateien\Eigene Musik\CDDB\*.txt

English Windows 7 (BAD):
C:\Users\username\My Documents\My Music\CDDB\*.txt
The correct path would be:
C:\Users\username\Music\CDDB\*.txt

We will now change FileKey1 so that it works using the new environment variables my script has set up for you:

FileKey1=%Music%\CDDB|*.txt

Which expands correctly on various systems:
C:\Documents and Settings\username\My Documents\My Music\CDDB\*.txt
C:\Dokumente und Einstellungen\username\Eigene Dateien\Eigene Musik\CDDB\*.txt
C:\Users\username\Music\CDDB\*.txt

Great, ain?t it? Of course I have tried all these out on several systems, but if you have CDex (or any other app mentioned in winapp2.ini), go try it out for yourself!

CCleaner should not be running while you?re editing winapp2.ini. Just start it after you have finished your edits and saved the file.

---

F. BUY ME A BEER? BUY ME A BEER! ;-)

If this was helpful for you and you feel like it, you can buy me a beer (or a cup of coffee) using the Paypal links on my homepage:

http://www.kaufen-ist-toll.de/moonbase#buyme

Don?t feel obliged, though. You don?t HAVE to. I?m perfectly happy if you like it and I could help you in any way. And I believe in Open Source, sharing knowledge and free access for all.

Enjoy!

moonbase (at) quantentunnel (dot) de

---

G. STILL HERE? WOW. THE LIST OF VARIABLES!

Here now is the list of variables that my script handles. Remember that not all of them might be available on any particular Windows version! Variables that are not available in the Windows version you?re running will be unset (removed) from the environment. Be aware that (currently) an unset variable, if used in construction of a CCleaner key, CAN lead to unpredicted results (i.e., trying to check for and/or cleaning a directory that doesn?t exist).

Some of the variables return CLSIDs, which are not per se useful in CCleaner file operations, but can be used as input in Windows Explorer?s address bar. These are listed separately.

All variables are listed in alphabetical order (per section).


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

These are most useful to use with CCleaner file operations. They will access the "right" special folders on almost any Windows 2000, XP, Vista or 7 machine, independent of its locale settings.


%CDBurning% (CSIDL_CDBURN_AREA, 0x3b)

V6.0: The file system directory that acts as a staging area for files waiting to be written to a CD.
A typical path is C:\Documents and Settings\username\Local Settings\Application Data\Microsoft\CD Burning.


%CommonFavorites% (CSIDL_COMMON_FAVORITES, 0x1f)

The file system directory that serves as a common repository for favorite items common to all users.


%CommonOEMLinks% (CSIDL_COMMON_OEM_LINKS, 0x3a)

This value is recognized in Windows Vista for backward compatibility, but the folder itself is no longer used. I?ve seen it come back in Windows 7, though.


%CommonStartup% (CSIDL_COMMON_STARTUP, 0x18)

The file system directory that contains the programs that appear in the Startup folder for all users.
A typical path is C:\Documents and Settings\All Users\Start Menu\Programs\Startup.


%Cookies% (CSIDL_COOKIES, 0x21)

The file system directory that serves as a common repository for Internet cookies.
A typical path is C:\Documents and Settings\username\Cookies.


%DesktopDirectory% (CSIDL_DESKTOPDIRECTORY, 0x10)

The file system directory used to physically store file objects on the desktop (not to be confused with the desktop folder itself).
A typical path is C:\Documents and Settings\username\Desktop.


%Favorites% (CSIDL_FAVORITES, 0x06)

The file system directory that serves as a common repository for the user's favorite items.
A typical path is C:\Documents and Settings\username\Favorites.


%History% (CSIDL_HISTORY, 0x22)

The file system directory that serves as a common repository for Internet history items.


%InternetCache% (CSIDL_INTERNET_CACHE, 0x20)

V4.72: The file system directory that serves as a common repository for temporary Internet files.
A typical path is C:\Documents and Settings\username\Local Settings\Temporary Internet Files.


%LocalAppData% (CSIDL_LOCAL_APPDATA, 0x1c)

V5.0: The file system directory that serves as a data repository for local (nonroaming) applications.
A typical path is C:\Documents and Settings\username\Local Settings\Application Data.


%Music% (CSIDL_MYMUSIC, 0x0d)

The file system directory that serves as a common repository for music files.
A typical path is C:\Documents and Settings\User\My Documents\My Music.


%Personal% (CSIDL_PERSONAL, 0x05)

V6.0: The virtual folder that represents the My Documents desktop item. This is equivalent to CSIDL_MYDOCUMENTS.
Previous to V6.0: The file system directory used to physically store a user's common repository of documents.
A typical path is C:\Documents and Settings\username\My Documents.
This should be distinguished from the virtual My Documents folder in the namespace. To access that virtual folder, use SHGetFolderLocation, which returns the ITEMIDLIST for the virtual location, or refer to the technique described in Managing the File System.


%Pictures% (CSIDL_MYPICTURES, 0x27)

V5.0: The file system directory that serves as a common repository for image files.
A typical path is C:\Documents and Settings\username\My Documents\My Pictures.


%Profile% (CSIDL_PROFILE, 0x28)

V5.0: The user's profile folder.
A typical path is C:\Users\username.
Applications should not create files or folders at this level; they should put their data under the locations referred to by CSIDL_APPDATA or CSIDL_LOCAL_APPDATA. However, if you are creating a new Known Folder the profile root referred to by CSIDL_PROFILE is appropriate.


%ProgramData% (CSIDL_COMMON_APPDATA, 0x23)

V5.0: The file system directory that contains application data for all users.
A typical path is C:\Documents and Settings\All Users\Application Data.
This folder is used for application data that is not user specific. For example, an application can store a spell-check dictionary, a database of clip art, or a log file in the CSIDL_COMMON_APPDATA folder.
This information will not roam and is available to anyone using the computer.


%ProgramFiles% (CSIDL_PROGRAM_FILES, 0x26)

V5.0: The Program Files folder.
A typical path is C:\Program Files.


%ProgramFilesCommon% (CSIDL_PROGRAM_FILES_COMMON, 0x2b)

V5.0: A folder for components that are shared across applications.
A typical path is C:\Program Files\Common. Valid only for Windows XP.


%ProgramFilesCommonX86% (CSIDL_PROGRAM_FILES_COMMONX86, 0x2c)


%ProgramFilesX86% (CSIDL_PROGRAM_FILESX86, 0x2a)


%PublicDesktop% (CSIDL_COMMON_DESKTOPDIRECTORY, 0x19)

The file system directory that contains files and folders that appear on the desktop for all users.
A typical path is C:\Documents and Settings\All Users\Desktop.


%PublicDocuments% (CSIDL_COMMON_DOCUMENTS, 0x2e)

The file system directory that contains documents that are common to all users.
A typical path is C:\Documents and Settings\All Users\Documents.


%PublicMusic% (CSIDL_COMMON_MUSIC, 0x35)

V6.0: The file system directory that serves as a repository for music files common to all users.
A typical path is C:\Documents and Settings\All Users\Documents\My Music.


%PublicPictures% (CSIDL_COMMON_PICTURES, 0x36)

V6.0: The file system directory that serves as a repository for image files common to all users.
A typical path is C:\Documents and Settings\All Users\Documents\My Pictures.


%PublicVideos% (CSIDL_COMMON_VIDEO, 0x37)

V6.0: The file system directory that serves as a repository for video files common to all users.
A typical path is C:\Documents and Settings\All Users\Documents\My Videos.


%Recent% (CSIDL_RECENT, 0x08)

The file system directory that contains shortcuts to the user's most recently used documents.
A typical path is C:\Documents and Settings\username\My Recent Documents.
To create a shortcut in this folder, use SHAddToRecentDocs.
In addition to creating the shortcut, this function updates the Shell's list of recent documents and adds the shortcut to the My Recent Documents submenu of the Start menu.


%RoamingAppData% (CSIDL_APPDATA, 0x1a)

V4.71: The file system directory that serves as a common repository for application-specific data.
A typical path is C:\Documents and Settings\username\Application Data.
This CSIDL is supported by the redistributable Shfolder.dll for systems that do not have the Microsoft Internet Explorer 4.0 integrated Shell installed.


%Startup% (CSIDL_STARTUP, 0x07)

The file system directory that corresponds to the user's Startup program group.
The system starts these programs whenever any user logs on.
A typical path is C:\Documents and Settings\username\Start Menu\Programs\Startup.


%System% (CSIDL_SYSTEM, 0x25)

V5.0: The Windows System folder.
A typical path is C:\Windows\System32.


%SystemX86% (CSIDL_SYSTEMX86, 0x29)

A typical path is C:\Windows\System32.


%Videos% (CSIDL_MYVIDEO, 0x0e)

V6.0: The file system directory that serves as a common repository for video files.
A typical path is C:\Documents and Settings\username\My Documents\My Videos.


%Windows% (CSIDL_WINDOWS, 0x24)

V5.0: The Windows directory or SYSROOT. This corresponds to the %windir% or %SYSTEMROOT% environment variables.
A typical path is C:\Windows.


2. VARIABLES THAT ARE USEFUL FOR SPECIAL REQUIREMENTS

These are intended for more special cases, or declared obsolete, and might not function as intended. You should know what you do, it?s all upon your own risk!


%AdminTools% (CSIDL_ADMINTOOLS, 0x30)

V5.0: The file system directory that is used to store administrative tools for an individual user.
The MMC will save customized consoles to this directory, and it will roam with the user.


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

The file system directory that corresponds to the user's nonlocalized Startup program group.
This value is recognized in Windows Vista for backward compatibility, but the folder itself no longer exists.


%CommonAdminTools% (CSIDL_COMMON_ADMINTOOLS, 0x2f)

V5.0: The file system directory that contains administrative tools for all users of the computer.


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

The file system directory that corresponds to the nonlocalized Startup program group for all users.
This value is recognized in Windows Vista for backward compatibility, but the folder itself no longer exists.


%CommonPrograms% (CSIDL_COMMON_PROGRAMS, 0x17)

The file system directory that contains the directories for the common program groups that appear on the Start menu for all users.
A typical path is C:\Documents and Settings\All Users\Start Menu\Programs.


%CommonStartMenu% (CSIDL_COMMON_STARTMENU, 0x16)

The file system directory that contains the programs and folders that appear on the Start menu for all users.
A typical path is C:\Documents and Settings\All Users\Start Menu.


%CommonTemplates% (CSIDL_COMMON_TEMPLATES, 0x2d)

The file system directory that contains the templates that are available to all users.
A typical path is C:\Documents and Settings\All Users\Templates.


%Desktop% (CSIDL_DESKTOP, 0x00)

The virtual folder that represents the Windows desktop, the root of the namespace.


%Documents% (CSIDL_MYDOCUMENTS, 0x0c)

V6.0: The virtual folder that represents the My Documents desktop item.
This value is equivalent to CSIDL_PERSONAL.


%Fonts% (CSIDL_FONTS, 0x14)

A virtual folder that contains fonts. A typical path is C:\Windows\Fonts.


%LocalizedResourcesDir% (CSIDL_RESOURCES_LOCALIZED, 0x39)


%NetHood% (CSIDL_NETHOOD, 0x13)

A file system directory that contains the link objects that may exist in the My Network Places virtual folder. It is not the same as CSIDL_NETWORK, which represents the network namespace root.
A typical path is C:\Documents and Settings\username\NetHood.


%PrintHood% (CSIDL_PRINTHOOD, 0x1b)

The file system directory that contains the link objects that can exist in the Printers virtual folder.
A typical path is C:\Documents and Settings\username\PrintHood.


%Programs% (CSIDL_PROGRAMS, 0x02)

The file system directory that contains the user's program groups (which are themselves file system directories).
A typical path is C:\Documents and Settings\username\Start Menu\Programs.


%ResourceDir% (CSIDL_RESOURCES, 0x38)

Windows Vista: The file system directory that contains resource data.
A typical path is C:\Windows\Resources.


%SendTo% (CSIDL_SENDTO, 0x09)

The file system directory that contains Send To menu items.
A typical path is C:\Documents and Settings\username\SendTo.


%StartMenu% (CSIDL_STARTMENU, 0x0b)

The file system directory that contains Start menu items.
A typical path is C:\Documents and Settings\username\Start Menu.


%Templates% (CSIDL_TEMPLATES, 0x15)

The file system directory that serves as a common repository for document templates.
A typical path is C:\Documents and Settings\username\Templates.


3. VARIABLES THAT ONLY RETURN CLSIDs

These are not useful for CCleaner (but can be for other purposes), because the only return CLSIDs. CLSIDs are globally unique identifiers that identify COM class objects, for instance "%RecycleBinFolder%" will return a CLSID of
::{645FF040-5081-101B-9F08-00AA002F954E}
which is the virtual folder that contains the objects in the user's Recycle Bin.

%ComputerFolder% (CSIDL_DRIVES, 0x11)

The virtual folder that represents My Computer, containing everything on the local computer: storage devices, printers, and Control Panel. The folder can also contain mapped network drives.


%ComputersNearMe% (CSIDL_COMPUTERSNEARME, 0x3d)

The folder that represents other computers in your workgroup.
Usually (only) contains a Workgroup or Domain Name.


%ConnectionsFolder% (CSIDL_CONNECTIONS, 0x31)

The virtual folder that represents Network Connections, that contains network and dial-up connections.


%ControlPanelFolder% (CSIDL_CONTROLS, 0x03)

The virtual folder that contains icons for the Control Panel applications.


%InternetFolder% (CSIDL_INTERNET, 0x01)

A virtual folder for Internet Explorer.


%Network% (CSIDL_NETWORK, 0x12)

A virtual folder that represents Network Neighborhood, the root of the network namespace hierarchy.


%PrintersFolder% (CSIDL_PRINTERS, 0x04)

The virtual folder that contains installed printers.


%RecycleBinFolder% (CSIDL_BITBUCKET, 0x0a)

The virtual folder that contains the objects in the user's Recycle Bin.


---
[/Code]

 

SetEnvVars.vbs

[Code]
' SetEnvVars.vbs -- CCleaner - Optional VBScript Module
' support for additional environment variables for winapp2.ini (and the like)
' 2010-12-03 Moonbase
'
' This script can also be run independently and will set up a bunch of
' useful environment vars, which can be used elsewhere. (In batch files, for example.)
'
' Hint:
' Try typing "%Music%" or "%ControlPanelFolder%" (without the apostrophes)
' into Windows Explorer's address bar ... Or even "%ConnectionsFolder%".
'
' WARNING - DO NOT EDIT THIS FILE
' Copyright ?2010 Matthias C. Hormann (aka Moonbase). All Rights Reserved.
' This file and it's contents may not be copied or distributed
' without the express permission of the author.

' debugging messages
dim debug
debug = FALSE

' Get some well-known Windows "Special Folders" into an array to set Environment Variables with.
' These change between different Windows versions and locales.
' Insofar possible, the names of the environment variables correspond
' to the latest KNOWNFOLDERID internal constant names.
' (FOLDERID_xxx, old CSIDL_xxx names noted in the comment.)
'
' WARNING: Not all values are defined in all Windows versions!
'
' Items marked with an asterisk * return CLSIDs, which can usually only
' be used with shell functions like SHGetFolderLocation, SHGetFolderPath,
' SHGetSpecialFolderLocation, and SHGetSpecialFolderPath.
' These are mainly included for my own use. (Or a programmer wishing to
' use the appropriate shell functions.)
'
' For the constants, refer to the header files Shlobj.h and Shfolder.h.
'
' Sub-Array Parameters:
' 0 = CSIDL constant
' 1 = Name used for the Environment Variable (derived from the CSIDL constants and Windows usage)
' 2 = Localized name in the OS's current locale (for debugging reference)
' 3 = The actual shell file path (can be a CSIDL of the form "::{xxx...}")
'
Dim ssf(56)

' The virtual folder that represents the Windows desktop, the root of the namespace.
ssf(00) = array(&H00, "Desktop", "", "") ' DESKTOP
' A virtual folder for Internet Explorer.
ssf(01) = array(&H01, "InternetFolder", "", "") '* INTERNET
' The file system directory that contains the user's program groups (which are themselves file system directories).
' A typical path is C:\Documents and Settings\username\Start Menu\Programs.
ssf(02) = array(&H02, "Programs", "", "") ' PROGRAMS
' The virtual folder that contains icons for the Control Panel applications.
ssf(03) = array(&H03, "ControlPanelFolder", "", "") '* CONTROLS
' The virtual folder that contains installed printers.
ssf(04) = array(&H04, "PrintersFolder", "", "") '* PRINTERS
' V6.0: The virtual folder that represents the My Documents desktop item. This is equivalent to CSIDL_MYDOCUMENTS.
' Previous to V6.0: The file system directory used to physically store a user's common repository of documents.
' A typical path is C:\Documents and Settings\username\My Documents.
' This should be distinguished from the virtual My Documents folder in the namespace.
' To access that virtual folder, use SHGetFolderLocation, which returns the ITEMIDLIST for the virtual location,
' or refer to the technique described in Managing the File System.
ssf(05) = array(&H05, "Personal", "", "") ' PERSONAL
' The file system directory that serves as a common repository for the user's favorite items.
' A typical path is C:\Documents and Settings\username\Favorites.
ssf(06) = array(&H06, "Favorites", "", "") ' FAVORITES
' The file system directory that corresponds to the user's Startup program group.
' The system starts these programs whenever any user logs on.
' A typical path is C:\Documents and Settings\username\Start Menu\Programs\Startup.
ssf(07) = array(&H07, "Startup", "", "") ' STARTUP
' The file system directory that contains shortcuts to the user's most recently used documents.
' A typical path is C:\Documents and Settings\username\My Recent Documents.
' To create a shortcut in this folder, use SHAddToRecentDocs.
' In addition to creating the shortcut, this function updates the Shell's list of recent documents
' and adds the shortcut to the My Recent Documents submenu of the Start menu.
ssf(08) = array(&H08, "Recent", "", "") ' RECENT
' The file system directory that contains Send To menu items.
' A typical path is C:\Documents and Settings\username\SendTo.
ssf(09) = array(&H09, "SendTo", "", "") ' SENDTO
' The virtual folder that contains the objects in the user's Recycle Bin.
ssf(10) = array(&H0a, "RecycleBinFolder", "", "") '* BITBUCKET
' The file system directory that contains Start menu items.
' A typical path is C:\Documents and Settings\username\Start Menu.
ssf(11) = array(&H0b, "StartMenu", "", "") ' STARTMENU
' V6.0: The virtual folder that represents the My Documents desktop item.
' This value is equivalent to CSIDL_PERSONAL.
ssf(12) = array(&H0c, "Documents", "", "") ' MYDOCUMENTS
' The file system directory that serves as a common repository for music files.
' A typical path is C:\Documents and Settings\User\My Documents\My Music.
ssf(13) = array(&H0d, "Music", "", "") ' MYMUSIC
' V6.0: The file system directory that serves as a common repository for video files.
' A typical path is C:\Documents and Settings\username\My Documents\My Videos.
ssf(14) = array(&H0e, "Videos", "", "") ' MYVIDEO
' The file system directory used to physically store file objects on the desktop
' (not to be confused with the desktop folder itself).
' A typical path is C:\Documents and Settings\username\Desktop.
ssf(15) = array(&H10, "DesktopDirectory", "", "") ' DESKTOPDIRECTORY
' The virtual folder that represents My Computer, containing everything on the local computer:
' storage devices, printers, and Control Panel. The folder can also contain mapped network drives.
ssf(16) = array(&H11, "ComputerFolder", "", "") '* DRIVES
' A virtual folder that represents Network Neighborhood,
' the root of the network namespace hierarchy.
ssf(17) = array(&H12, "Network", "", "") '* NETWORK
' A file system directory that contains the link objects that may exist in the My Network Places virtual folder.
' It is not the same as CSIDL_NETWORK, which represents the network namespace root.
' A typical path is C:\Documents and Settings\username\NetHood.
ssf(18) = array(&H13, "NetHood", "", "") ' NETHOOD
' A virtual folder that contains fonts. A typical path is C:\Windows\Fonts.
ssf(19) = array(&H14, "Fonts", "", "") ' FONTS
' The file system directory that serves as a common repository for document templates.
' A typical path is C:\Documents and Settings\username\Templates.
ssf(20) = array(&H15, "Templates", "", "") ' TEMPLATES
' The file system directory that contains the programs and folders that appear on the Start menu for all users.
' A typical path is C:\Documents and Settings\All Users\Start Menu.
ssf(21) = array(&H16, "CommonStartMenu", "", "") ' COMMON_STARTMENU
' The file system directory that contains the directories for the common program groups
' that appear on the Start menu for all users.
' A typical path is C:\Documents and Settings\All Users\Start Menu\Programs.
ssf(22) = array(&H17, "CommonPrograms", "", "") ' COMMON_PROGRAMS
' The file system directory that contains the programs that appear in the Startup folder for all users.
' A typical path is C:\Documents and Settings\All Users\Start Menu\Programs\Startup.
ssf(23) = array(&H18, "CommonStartup", "", "") ' COMMON_STARTUP
' The file system directory that contains files and folders that appear on the desktop for all users.
' A typical path is C:\Documents and Settings\All Users\Desktop.
ssf(24) = array(&H19, "PublicDesktop", "", "") ' COMMON_DESKTOPDIRECTORY
' V4.71: The file system directory that serves as a common repository for application-specific data.
' A typical path is C:\Documents and Settings\username\Application Data.
' This CSIDL is supported by the redistributable Shfolder.dll for systems that do not have the Microsoft Internet Explorer 4.0 integrated Shell installed.
ssf(25) = array(&H1a, "RoamingAppData", "", "") ' APPDATA
' The file system directory that contains the link objects that can exist in the Printers virtual folder.
' A typical path is C:\Documents and Settings\username\PrintHood.
ssf(26) = array(&H1b, "PrintHood", "", "") ' PRINTHOOD
' V5.0: The file system directory that serves as a data repository for local (nonroaming) applications.
' A typical path is C:\Documents and Settings\username\Local Settings\Application Data.
ssf(27) = array(&H1c, "LocalAppData", "", "") ' LOCAL_APPDATA
' The file system directory that corresponds to the user's nonlocalized Startup program group.
' This value is recognized in Windows Vista for backward compatibility, but the folder itself no longer exists.
ssf(28) = array(&H1d, "AltStartup", "", "") ' ALTSTARTUP, obsolete, use "Startup"
' The file system directory that corresponds to the nonlocalized Startup program group for all users.
' This value is recognized in Windows Vista for backward compatibility, but the folder itself no longer exists.
ssf(29) = array(&H1e, "CommonAltStartup", "", "") ' COMMON_ALTSTARTUP, obsolete, use "CommonStartup"
' The file system directory that serves as a common repository for favorite items common to all users.
ssf(30) = array(&H1f, "CommonFavorites", "", "") ' COMMON_FAVORITES
' V4.72: The file system directory that serves as a common repository for temporary Internet files.
' A typical path is C:\Documents and Settings\username\Local Settings\Temporary Internet Files.
ssf(31) = array(&H20, "InternetCache", "", "") ' INTERNET_CACHE
' The file system directory that serves as a common repository for Internet cookies.
' A typical path is C:\Documents and Settings\username\Cookies.
ssf(32) = array(&H21, "Cookies", "", "") ' COOKIES
' The file system directory that serves as a common repository for Internet history items.
ssf(33) = array(&H22, "History", "", "") ' HISTORY
' V5.0: The file system directory that contains application data for all users.
' A typical path is C:\Documents and Settings\All Users\Application Data.
' This folder is used for application data that is not user specific.
' For example, an application can store a spell-check dictionary, a database of clip art, or a log file in the CSIDL_COMMON_APPDATA folder.
' This information will not roam and is available to anyone using the computer.
ssf(34) = array(&H23, "ProgramData", "", "") ' COMMON_APPDATA
' V5.0: The Windows directory or SYSROOT. This corresponds to the %windir% or %SYSTEMROOT% environment variables.
' A typical path is C:\Windows.
ssf(35) = array(&H24, "Windows", "", "") ' WINDOWS
' V5.0: The Windows System folder.
' A typical path is C:\Windows\System32.
ssf(36) = array(&H25, "System", "", "") ' SYSTEM
' V5.0: The Program Files folder.
' A typical path is C:\Program Files.
ssf(37) = array(&H26, "ProgramFiles", "", "") ' PROGRAM_FILES
' V5.0: The file system directory that serves as a common repository for image files.
' A typical path is C:\Documents and Settings\username\My Documents\My Pictures.
ssf(38) = array(&H27, "Pictures", "", "") ' MYPICTURES
' V5.0: The user's profile folder.
' A typical path is C:\Users\username.
' Applications should not create files or folders at this level; they should put their data
' under the locations referred to by CSIDL_APPDATA or CSIDL_LOCAL_APPDATA. However,
' if you are creating a new Known Folder the profile root referred to by CSIDL_PROFILE is appropriate.
ssf(39) = array(&H28, "Profile", "", "") ' PROFILE
' SYSTEMX86
ssf(40) = array(&H29, "SystemX86", "", "") ' SYSTEMX86
' PROGRAM_FILESX86
ssf(41) = array(&H2a, "ProgramFilesX86", "", "") ' PROGRAM_FILESX86
' V5.0: A folder for components that are shared across applications.
' A typical path is C:\Program Files\Common. Valid only for Windows XP.
ssf(42) = array(&H2b, "ProgramFilesCommon", "", "") ' PROGRAM_FILES_COMMON
' PROGRAM_FILES_COMMONX86
ssf(43) = array(&H2c, "ProgramFilesCommonX86", "", "") ' PROGRAM_FILES_COMMONX86
' The file system directory that contains the templates that are available to all users.
' A typical path is C:\Documents and Settings\All Users\Templates.
ssf(44) = array(&H2d, "CommonTemplates", "", "") ' COMMON_TEMPLATES
' The file system directory that contains documents that are common to all users.
' A typical path is C:\Documents and Settings\All Users\Documents.
ssf(45) = array(&H2e, "PublicDocuments", "", "") ' COMMON_DOCUMENTS
' V5.0: The file system directory that contains administrative tools for all users of the computer.
ssf(46) = array(&H2f, "CommonAdminTools", "", "") ' COMMON_ADMINTOOLS
' V5.0: The file system directory that is used to store administrative tools for an individual user.
' The MMC will save customized consoles to this directory, and it will roam with the user.
ssf(47) = array(&H30, "AdminTools", "", "") ' ADMINTOOLS
' The virtual folder that represents Network Connections,
' that contains network and dial-up connections.
ssf(48) = array(&H31, "ConnectionsFolder", "", "") '* CONNECTIONS
' V6.0: The file system directory that serves as a repository for music files common to all users.
' A typical path is C:\Documents and Settings\All Users\Documents\My Music.
ssf(49) = array(&H35, "PublicMusic", "", "") ' COMMON_MUSIC
' V6.0: The file system directory that serves as a repository for image files common to all users.
' A typical path is C:\Documents and Settings\All Users\Documents\My Pictures.
ssf(50) = array(&H36, "PublicPictures", "", "") ' COMMON_PICTURES
' V6.0: The file system directory that serves as a repository for video files common to all users.
' A typical path is C:\Documents and Settings\All Users\Documents\My Videos.
ssf(51) = array(&H37, "PublicVideos", "", "") ' COMMON_VIDEO
' Windows Vista: The file system directory that contains resource data.
' A typical path is C:\Windows\Resources.
ssf(52) = array(&H38, "ResourceDir", "", "") ' RESOURCES
' RESOURCES_LOCALIZED
ssf(53) = array(&H39, "LocalizedResourcesDir", "", "") ' RESOURCES_LOCALIZED
' This value is recognized in Windows Vista for backward compatibility,
' but the folder itself is no longer used.
ssf(54) = array(&H3a, "CommonOEMLinks", "", "") ' COMMON_OEM_LINKS
' V6.0: The file system directory that acts as a staging area for files waiting to be written to a CD.
' A typical path is C:\Documents and Settings\username\Local Settings\Application Data\Microsoft\CD Burning.
ssf(55) = array(&H3b, "CDBurning", "", "") ' CDBURN_AREA
' The folder that represents other computers in your workgroup.
' Usually contains a Workgroup or Domain Name.
ssf(56) = array(&H3d, "ComputersNearMe", "", "") ' COMPUTERSNEARME

dim wshShell
dim objShell
dim objFolder

set wshShell = CreateObject("WScript.Shell")
set objShell = CreateObject("Shell.Application")

' Set the Environment to work on.
' Can be "System" (HKLM), "User" (HKCU), "Volatile" or "Process".
' If you experience UAC problems (Vista, Win7), you might try "Volatile" instead.
dim envType
envType = "User"
set objEnv = wshShell.Environment(envType)

for each id in ssf

set objFolder = objShell.NameSpace(id(0))

if (not objFolder is NOTHING) then
id(2) = objFolder.Title ' the name localized
id(3) = objFolder.Self.Path ' the file path (or CSIDL)
objEnv(id(1)) = id(3) ' add to evironment variables (or change existing)
if (debug) then
' Debugging message
WScript.Echo "Adding " & id(1) & " (" & id(2) & ") with ID " & id(0) & vbcrlf _
& "to " & envType & " environment variables:" & vbcrlf _
& "" & id(3) & ""
end if
else
if (not objEnv(id(1)) = "") then
if debug then
' Debugging message
WScript.Echo "Removing undefined " & id(1) & " with ID " & id(0) & vbcrlf _
& "from " & envType & " environment variables."
end if
objEnv.Remove id(1) ' remove from environment variables
else
if debug then
' Debugging message
WScript.Echo "Ignoring undefined " & id(1) & " with ID " & id(0) & "."
end if
end if
end if

next

set envType = NOTHING
set objFolder = NOTHING
set objShell = NOTHING
set objEnv = NOTHING
set wshShell = NOTHING
[/Code]

Link to comment
Share on other sites

  • Moderators

Moonbase I removed the original direct download by you in your first post. I'm sure you can understand the reason why from a moderator point of view whose job it is to keep the forum free of spam and a safe place for members.

 

Look at it from my point of view, you had only a few posts and were posting links to your own site and using direct downloads. We get a lot of posts here and cannot give time to download things to check they are safe.

 

 

Member Winapp2ini has shown above what was meant. I note that you are posting it as copyrighted material, bear in mind that most things posted here (such as Winapp2ini list) are all compiled by members and are free for all to use as they see fit.

 

Don't take offense just because we concentrate on trying to protect our members, enjoy the forum and forget the hiccup of your initial posts :)

 

Support contact

https://support.ccleaner.com/s/contact-form?language=en_US&form=general

or

support@ccleaner.com

 

Link to comment
Share on other sites

Hazelnut: No, I understand your point of view. I?d probably also be a little suspicious when a forum newbie came up with downloadable stuff in one of his first posts. Then again, I always somehow assume that everyone knows that I?m working with EDP (what nowadays is IT) since 1976 ? :lol:

 

I was just assuming that someone (a mod) would have a quick peek over it, see it?s okay, and leave it. The main reasons for the ZIP were

  • not to have a "clickable" (and thus executable) VBScript on the page,
  • be sure that everyone could copy it over unmodified (copying from forum posts can be quite erroneous)
  • not to clutter the thread ? in most forums it is not wanted to have extra-long posts, and actually often a "max. characters" counter in effect. I wasn?t aware that it is allowed here.

 

Glad it seems sorted out now. Cheers to Winapp2.ini for taking the effort to put it all up here as a post. Phew! :) (Btw, the indentation has apparently been corrupted when copying it into the forum.)

 

Now everybody can see how clumsy my code is, written kinda tounge-in-cheek. Aaargh! :D I apologize for the horrible typo in winsys2.ini. It should have been "This file and its contents", not "This file and it's contents". Aaargh again ?

 

Oh well, the copyright. Also kinda "everyday" automatism, sorry.

 

"I herewith grant free use of my posted code for everyone, especially CCleaner users and developers. This is valid for both private and commercial use. Do what you want with it, study it, encorporate it into your own software, throw it away, use it, whatever. Only don?t try to sell my work as your own. If incorporating the code into your own product, please at least mention my name somewhere in a "contributors" list ? thanks! And I can?t take any liability that the code and/or documentation are fit for use for any given purpose."

 

Hope that?s good enough. :)

Link to comment
Share on other sites

Please note that I have just received what I expected, an error message which was

"Error You aren't permitted to upload this kind of file"

 

That is automatic because I chose to attach a *.REG file.

There is no problem should I name it as a *.TXT file.

 

A *.TXT file is considered safe.

An accidental click should result in Notepad allowing the user to read/edit the file,

it should not destroy the system (assuming no special Windows font vulnerability occurs).

 

A *.REG file will do no harm if carefully inspected by opening with a text editor,

but the default result of an accidental click is to alter the registry.

That is dangerous if it is a malevolent file,

It is equally dangerous if it is a benevolent file with unexpected side effects on some systems.

A benevolent and PERFECT file may damage operating systems it was not intended for.

 

In my experience :-

A few forums only allow links to file sharing sites, presumably to minimize operating costs;

Most will allow attached files, but generally block anything with an extension for which the file association has the potential to modify/damage the system.

 

I do find it remiss of Piriform that there is no list of what extensions are permitted.

Many sites have this information on display BEFORE browsing to the location of a file to Upload,

and all the others will tell you what is allowed if they do not like what you try to upload,

only Piriform simply says (to paraphrase) "that was naughty, don't do it again".

 

Incidentally, a file that is uploaded to the Piriform servers is protected by the Security system which is under Piriform control,

Any Direct Download is not protected by Piriform, and even if a moderator used the link to confirm the safety of the file at the time of inspection, there is no guarantee that what is on your server will remain safe if your site is hacked.

 

Regards

Alan

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.