Results 1 to 4 of 4

Thread: Where are cookies stored on PC??

  1. #1

    Thread Starter
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Where are cookies stored on PC??

    ..for both IE (6) and Firefox (1.5)!!
    Show Appreciation. Rate Posts.

  2. #2
    PowerPoster
    Join Date
    May 2006
    Posts
    2,988

    Re: Where are cookies stored on PC??

    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
    Code:
    '// 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
    Last edited by rory; Mar 17th, 2007 at 11:25 AM.

  3. #3

    Thread Starter
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: Where are cookies stored on PC??

    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.
    Show Appreciation. Rate Posts.

  4. #4
    Fanatic Member
    Join Date
    Feb 2003
    Location
    C:\Windows\Microsoft.NET\Framework
    Posts
    574

    Re: Where are cookies stored on PC??

    Quote Originally Posted by Harsh Gupta
    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/de...nums/csidl.asp

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width