quote:
Originally posted by -!Felu!-
quote:
Originally posted by NiteMare
the temp folders, or the temporary internet files folder
The Temp folder is located in \Documents and Settings\(username)\Local Settings\Temp
The Temp Internet Files is located in \Documents and Settings\(username)\Local Settings\Temporary Internet Files
Actually, that's not always the case. In fact, it quite often isn't the correct location. The correct location depends on many things. To know the correct location it is best to programmatically get the location by using a certain Windows API: SHGetSpecialFolderPath(). Other than that you can use the registry as a guide:
The Temp folder is located in the directory stated in the environment variable TEMP or TMP. This value of these environment variables can be found in the registry setting:
HKEY_CURRENT_USER\Environment
And the Temporary Internet Files folders for the current user can be found by looking at the registry setting:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Cache
or
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Cache
The default Temporary Internet Files folder for all users (used when no user-specific path is set):
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Cache\Paths
NOTE THAT USING THESE REGISTRY KEYS TO FIND THOSE FOLDERS IS ACTUALLY A BAD METHOD! You
must use the APIs SHGetSpecialFolderLocation, SHGetSpecialFolderPath and the likes instead...
more here
----------
Talking about APIs to get the exact location, another way to do some stuff with the cached internet files is using the APIs in Wininet.dll: DeleteUrlCacheEntry, FindFirstUrlCacheEntry, FindNextUrlCacheEntry,
FindCloseUrlCache, ...
----------
All in all it shows that the directories of the temporary internet files and temp folder aren't always "\Documents and Settings\(username)\etc". It depends from user to user and from computer to computer.
Moreover, the Temporary Internet Files folder is only used by MSIE. If you use another browser the internet cache folder will be way different and there isn't any API to determine the exact location; to know the exact location for your browser (other than MSIE) you need to look into your browser's preferences.