Firefox und Google Chrome Cache-Pfad ermitteln

    • VB.NET

    Es gibt 3 Antworten in diesem Thema. Der letzte Beitrag () ist von jaguar100.

      Firefox und Google Chrome Cache-Pfad ermitteln

      Hi

      Ich hatte diesen COde schon mal in ei Programm eingebaut, und jetzt möchte ich ihn für die Öffentlichkeit zugänglich machen.
      Der Code erkennt euern Firefox und Google Chrome Cache und schickt ihn an eine ListBox

      VB.NET-Quellcode

      1. Private Sub CacheSuchen(ByVal liste As ListBox)
      2. Dim LocalApplicationData As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
      3. Dim FirefoxPfad As String = LocalApplicationData & "\Mozilla\Firefox\Profiles\"
      4. Dim FirefoxCache As String = ""
      5. Dim ChromeCache As String = LocalApplicationData & "\Google\Chrome\User Data\Default\Cache"
      6. If IO.Directory.Exists(FirefoxPfad) = True Then
      7. Dim profiles() As String = IO.Directory.GetDirectories(FirefoxPfad)
      8. Dim profilelist As New ListBox
      9. For Each i As String In profiles
      10. Dim profiledir As String = IO.Path.GetFileName(i)
      11. profilelist.Items.Add(profiledir)
      12. For j = 0 To profilelist.Items.Count - 1
      13. FirefoxCache = FirefoxPfad & profilelist.Items.Item(j) & "\Cache"
      14. Next
      15. Next i
      16. If Not liste.Items.Contains(FirefoxCache) Then
      17. liste.Items.Add(FirefoxCache)
      18. End If
      19. Else : End If
      20. If IO.Directory.Exists(ChromeCache) = True Then
      21. If Not liste.Items.Contains(ChromeCache) Then
      22. liste.Items.Add(ChromeCache)
      23. End If
      24. Else : End If
      25. End Sub


      Grüße