[VB.NET] Entering Mozilla Firefox's Profiles Folder? [XP] menu

User Tag List

Results 1 to 3 of 3
  1. #1
    Ryoushi.'s Avatar Member
    Reputation
    54
    Join Date
    Nov 2008
    Posts
    126
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [VB.NET] Entering Mozilla Firefox's Profiles Folder? [XP]

    I'm having difficulty leading my VB.NET program to the Profiles folder in Firefox.

    For me, this is at...
    Code:
    C:\Documents and Settings\username\Application Data\Mozilla\Firefox\Profiles\e4lp4t1f.default\
    ... So my question is, how can I change the "username" folder to currentuser, and how can I enter the "e4lp4t1f.default" folder without knowing the folders name? It's different to everyone. I suppose I could get the directory name and use that, but I'd rather just skip it.


    I can provide any required information or part(s) of my code.
    Thankyou.

    [VB.NET] Entering Mozilla Firefox's Profiles Folder? [XP]
  2. #2
    ReidE96's Avatar Archer Authenticator enabled
    Reputation
    470
    Join Date
    Dec 2006
    Posts
    1,625
    Thanks G/R
    1/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\WinLogon\DefaultUserName
    You can read the currently logged on user's username from that registry entry. In the
    Code:
    C:\Documents and Settings\username\Application Data\Mozilla\Firefox
    folder, you'll find the Profiles.ini file. Read it into your programs memory. They always start more or less like this:
    Code:
    [General]
    
    StartWithLastProfile=1
    
    [Profile0]
    Name=default
    IsRelative=1
    Path=Profiles/qioxtndq.default
    Just read by line until you get the "Name=default" line, read the next line, if it says "IsRelative=1" then read the next line and strip the leftmost 5 characters, and add it to the end of the Firefox folder, if it says "IsRelative=0" (less likely), just read the next line, strip the leftmost 5, and you have the default profile folder.

  3. #3
    Apoc's Avatar Angry Penguin
    Reputation
    1388
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    Private Function GetFirefoxUserDir() As String
        Dim appDataDir As String = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\Mozilla\Firefox\Profiles\"
        Dim firstClientDir As String = Directory.GetDirectories(appDataDir)(0)
        Return firstClientDir
    End Function
    Enjoy. L2.NET Reid

Similar Threads

  1. Mozilla Firefox Plug-ins
    By Banksey in forum Community Chat
    Replies: 0
    Last Post: 01-15-2008, 06:26 PM
  2. Mozilla Firefox : Downloader
    By Nomiss in forum Community Chat
    Replies: 2
    Last Post: 11-18-2007, 05:02 PM
  3. Mozilla Firefox Proxy
    By Wonderboy in forum Community Chat
    Replies: 6
    Last Post: 10-29-2007, 02:32 PM
All times are GMT -5. The time now is 06:51 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search