I need a list of all cookie files for the currently logged in user so here is my code:
'inside the form's load event
Dim strFiles() As String
Dim strFile As String
strFiles = System.IO.Directory.GetFiles(CookieDir)
For Each strFile In strFiles
MsgBox(strFile) 'just using msgbox as an example
Next
'
Private Function CookieDir() As String
Dim regCookieDir As Microsoft.Win32.RegistryKey
regCookieDir = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE").OpenSubKey("Microsoft").OpenSubKey("Windows").OpenSubKey("CurrentVersion").OpenSubKey("Internet Settings").OpenSubKey("Cache").OpenSubKey("Special Paths").OpenSubKey("Cookies")
CookieDir = regCookieDir.GetValue("Directory")
End Function
But only 10 files are listed/shown... I can look in my cookies directory in explorer (the same one being returned by CookieDir()) and see 214 objects.. why doesn't the array contain all the files?
Question
todd
I need a list of all cookie files for the currently logged in user so here is my code:
'inside the form's load event Dim strFiles() As String Dim strFile As String strFiles = System.IO.Directory.GetFiles(CookieDir) For Each strFile In strFiles MsgBox(strFile) 'just using msgbox as an example Next ' Private Function CookieDir() As String Dim regCookieDir As Microsoft.Win32.RegistryKey regCookieDir = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE").OpenSubKey("Microsoft").OpenSubKey("Windows").OpenSubKey("CurrentVersion").OpenSubKey("Internet Settings").OpenSubKey("Cache").OpenSubKey("Special Paths").OpenSubKey("Cookies") CookieDir = regCookieDir.GetValue("Directory") End FunctionBut only 10 files are listed/shown... I can look in my cookies directory in explorer (the same one being returned by CookieDir()) and see 214 objects.. why doesn't the array contain all the files?
Link to comment
Share on other sites
7 answers to this question
Recommended Posts