Ya, this is an old thread, but here is some code. You can parse the
Users directory from the Favorites dir. Then you will know that
the Cookies, etc. are in that folder too or use the second code
example to get the users dir.

VB Code:
  1. Const CSIDL_DESKTOP = &H0
  2. Const CSIDL_PROGRAMS = &H2
  3. Const CSIDL_CONTROLS = &H3
  4. Const CSIDL_PRINTERS = &H4
  5. Const CSIDL_PERSONAL = &H5
  6. Const CSIDL_FAVORITES = &H6
  7. Const CSIDL_STARTUP = &H7
  8. Const CSIDL_RECENT = &H8
  9. Const CSIDL_SENDTO = &H9
  10. Const CSIDL_BITBUCKET = &HA
  11. Const CSIDL_STARTMENU = &HB
  12. Const CSIDL_DESKTOPDIRECTORY = &H10
  13. Const CSIDL_DRIVES = &H11
  14. Const CSIDL_NETWORK = &H12
  15. Const CSIDL_NETHOOD = &H13
  16. Const CSIDL_FONTS = &H14
  17. Const CSIDL_TEMPLATES = &H15
  18. Const MAX_PATH = 260
  19. Private Type SHI TEMID 'TAKE SPACE OUT
  20.     cb As Long
  21.     abID As Byte
  22. End Type
  23. Private Type ITEMIDLIST
  24.     mkid As SHI TEMID 'TAKE SPACE OUT
  25. End Type
  26. Private Declare Function ShellAbout Lib "shell32.dll" Alias "ShellAboutA" (ByVal hWnd As Long, ByVal szApp As String, ByVal szOtherStuff As String, ByVal hIcon As Long) As Long
  27. Private Declare Function SHGetSpecialFolderLocation Lib "shell32.dll" (ByVal hwndOwner As Long, ByVal nFolder As Long, pidl As ITEMIDLIST) As Long
  28. Private Declare Function SHGetPathFromIDList Lib "shell32.dll" Alias "SHGetPathFromIDListA" (ByVal pidl As Long, ByVal pszPath As String) As Long
  29. Private Sub Form_Load()
  30.     'KPD-Team 1998
  31.     'URL: [url]http://www.allapi.net/[/url]
  32.     'E-Mail: [email][email protected][/email]
  33.     'Show an about window
  34.     ShellAbout Me.hWnd, App.Title, "Created by the KPD-Team 1999", ByVal 0&
  35.     'Set the graphical mode to persistent
  36.     Me.AutoRedraw = True
  37.     'Print the folders to the form
  38.     Me.Print "Start menu folder: " + GetSpecialfolder(CSIDL_STARTMENU)
  39.     Me.Print "Favorites folder: " + GetSpecialfolder(CSIDL_FAVORITES)
  40.     Me.Print "Programs folder: " + GetSpecialfolder(CSIDL_PROGRAMS)
  41.     Me.Print "Desktop folder: " + GetSpecialfolder(CSIDL_DESKTOP)
  42. End Sub
  43. Private Function GetSpecialfolder(CSIDL As Long) As String
  44.     Dim r As Long
  45.     Dim IDL As ITEMIDLIST
  46.     'Get the special folder
  47.     r = SHGetSpecialFolderLocation(100, CSIDL, IDL)
  48.     If r = NOERROR Then
  49.         'Create a buffer
  50.         Path$ = Space$(512)
  51.         'Get the path from the IDList
  52.         r = SHGetPathFromIDList(ByVal IDL.mkid.cb, ByVal Path$)
  53.         'Remove the unnecessary chr$(0)'s
  54.         GetSpecialfolder = Left$(Path, InStr(Path, Chr$(0)) - 1)
  55.         Exit Function
  56.     End If
  57.     GetSpecialfolder = ""
  58. End Function
VB Code:
  1. Private Const TOKEN_QUERY = (&H8)
  2. Private Declare Function GetAllUsersProfileDirectory Lib "userenv.dll" Alias "GetAllUsersProfileDirectoryA" (ByVal lpProfileDir As String, lpcchSize As Long) As Boolean
  3. Private Declare Function GetDefaultUserProfileDirectory Lib "userenv.dll" Alias "GetDefaultUserProfileDirectoryA" (ByVal lpProfileDir As String, lpcchSize As Long) As Boolean
  4. Private Declare Function GetProfilesDirectory Lib "userenv.dll" Alias "GetProfilesDirectoryA" (ByVal lpProfileDir As String, lpcchSize As Long) As Boolean
  5. Private Declare Function GetUserProfileDirectory Lib "userenv.dll" Alias "GetUserProfileDirectoryA" (ByVal hToken As Long, ByVal lpProfileDir As String, lpcchSize As Long) As Boolean
  6. Private Declare Function GetCurrentProcess Lib "kernel32" () As Long
  7. Private Declare Function OpenProcessToken Lib "advapi32" (ByVal ProcessHandle As Long, ByVal DesiredAccess As Long, TokenHandle As Long) As Long
  8. Private Sub Form_Load()
  9.     'KPD-Team 2000
  10.     'URL: [url]http://www.allapi.net/[/url]
  11.     'E-Mail: [email][email protected][/email]
  12.     Dim sBuffer As String, Ret As Long, hToken As Long
  13.     'set the graphics mode of this form to 'persistent'
  14.     Me.AutoRedraw = True
  15.     'create a string buffer
  16.     sBuffer = String(255, 0)
  17.     'retrieve the all users profile directory
  18.     GetAllUsersProfileDirectory sBuffer, 255
  19.     'show the result
  20.     Me.Print StripTerminator(sBuffer)
  21.     'create a string buffer
  22.     sBuffer = String(255, 0)
  23.     'retrieve the user profile directory
  24.     GetDefaultUserProfileDirectory sBuffer, 255
  25.     'show the result
  26.     Me.Print StripTerminator(sBuffer)
  27.     'create a string buffer
  28.     sBuffer = String(255, 0)
  29.     'retrieve the profiles directory
  30.     GetProfilesDirectory sBuffer, 255
  31.     'show the result
  32.     Me.Print StripTerminator(sBuffer)
  33.     'create a string buffer
  34.     sBuffer = String(255, 0)
  35.     'open the token of the current process
  36.     OpenProcessToken GetCurrentProcess, TOKEN_QUERY, hToken
  37.     'retrieve this users profile directory
  38.     GetUserProfileDirectory hToken, sBuffer, 255
  39.     'show the result
  40.     Me.Print StripTerminator(sBuffer)
  41. End Sub
  42. 'strips off the trailing Chr$(0)'s
  43. Function StripTerminator(sInput As String) As String
  44.     Dim ZeroPos As Long
  45.     ZeroPos = InStr(1, sInput, Chr$(0))
  46.     If ZeroPos > 0 Then
  47.         StripTerminator = Left$(sInput, ZeroPos - 1)
  48.     Else
  49.         StripTerminator = sInput
  50.     End If
  51. End Function