PDA

Click to See Complete Forum and Search --> : Where are cookies stored on PC??


Harsh Gupta
Mar 16th, 2007, 03:58 PM
..for both IE (6) and Firefox (1.5)!!

rory
Mar 17th, 2007, 10:56 AM
Windows XP

FireFox: (2.0, 1.5?)
\Documents and Settings\USER\Application Data\Mozilla\Firefox\Profiles\*.*\Cookies.txt
%USERPROFILE%\Application Data\Mozilla\Firefox\Profiles\*.*\Cookies.txt

IE:
\Documents and Settings\USER\Cookies
%USERPROFILE%\Cookies
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Cookies

'// VB6 CODE
Private Declare Function SHGetFolderPath Lib "shfolder" Alias "SHGetFolderPathA" _
(ByVal hwndOwner As Long, ByVal nFolder As Long, ByVal hToken As Long, _
ByVal dwFlags As Long, ByVal pszPath As String) As Long

Private Function GetCookiesPath() As String
Dim strPath As String
Dim lngReturn As Long
Dim lngCSIDL As Long
lngCSIDL = &H21
strPath = String(260, 0)
lngReturn = SHGetFolderPath(0, lngCSIDL, 0, &H0, strPath)
GetCookiesPath = Left$(strPath, InStr(1, strPath, Chr(0)) - 1)
End Function

Private Sub Command1_Click()
Debug.Print GetCookiesPath
End Sub

Harsh Gupta
Mar 23rd, 2007, 09:08 AM
Thanks for the code.

Could you please tell me how you arrived at this value??

lngCSIDL = &H21

or how the code is working??

Thank you.

Sathyaish
Mar 29th, 2007, 08:00 AM
Thanks for the code.

Could you please tell me how you arrived at this value??

lngCSIDL = &H21

or how the code is working??

Thank you.


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/enums/csidl.asp