Discovering Paths
Find out how CleanCache.pl discovers the paths to cached data.
October 5, 2003
Each user has a dedicated profile directory. This profile contains user-account information that's specific to that user (e.g., Internet bookmarks, registry hive, Recent File List, My Documents list, program settings). Typically, the profile directory is a subdirectory of C:documents and settings and is identified by the user's user ID. For example, a user with the user ID Ralph would have the profile C:documents and settingsralph. However, the assumption that this user's Recent Documents directory would be C:documents and settingsralphrecent might not be correct. For example, if the user has a roaming profile, the profile directory might be \profile_serverusersralph.
Windows has a special function, SHGetFolderPath(), to discover the path to directories such as Temporary Internet Files and Recent File List. When you call this function, you need to pass in a folder value, called a class identifier (CLSID), that identifies the directory you're looking up. More information about these CLSID values is available at http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/enums/csidl.asp.
About the Author
You May Also Like