Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7745091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:55:34+00:00 2026-06-01T09:55:34+00:00

What i am trying to do is to change the default homepage for Mozilla

  • 0

What i am trying to do is to change the default homepage for Mozilla Firefox, I know that the homepage is stored in the following path ( In my computer )

C:\\Users\\JohnnyB\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\jmwb4bnw.default\\prefs.js

The problem is that the jmwb4bnw.default folder has a different name in each computer, which may lead my file to not work on other computer due to different folder name. For me, everything is Ok, but for other computer it doesn’t work because of the wrong file path.

My question is how can i access the jmwb4bnw.default folder regardless to it’s current name, this folder is a unique folder under Profiles folder.

The snippest code i am using is: (It works only on my computer)

string ff_filepath = "C:\\Users\\Sandbox\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\jmwb4bnw.default\\prefs.js";
string myLine = "user_pref('browser.startup.homepage', 'www.monde-presse.com');";


StreamWriter sw;
sw = File.AppendText(ff_filepath);
sw.WriteLine(myLine);
sw.Close();

How to make the code above works on every computer ?
Or in such language, how to tell C# to access the jmwb4bnw.default folder regardless to it’s name..

Note : The \Profiles\ folder contain no files, and Only one folder named jmwb4bnw.default, maybe there is someway to tell C# to access the subfolder which is found on Profiles folder regardless to it’s current name ?

Finally : How can i make the above code snippest to work on every Computer ?

(In the example above, we assume that default drive is always C, and user profile is always JohnnyB)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T09:55:35+00:00Added an answer on June 1, 2026 at 9:55 am

    You can use GetDirectories() function:

    string userName = "Sandbox";
    string[] folders = Directory.GetDirectories("C:\\Users\\" + userName  + "\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\", "*.default");
    

    folders will contain all subdirectories, which ends with .default

    in this case folders[0] will be

    C:\Users\Sandbox\AppData\Roaming\Mozilla\Firefox\Profiles\jmwb4bnw.default

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to change the default path or add a path that the webserver
I'm trying to know whether it is possible to change the default android OS
I'm currently trying to change the default behaviour of a multiselect element, so that
Well, I've been trying to change the default theme of spree by following this
I'm following the Django tutorial . I've been trying to change the default template,
I'm trying to change the default event handler code generator, so that it generates
I'm trying to change the default java icon that appears in taskbar everytime I
I'm trying to change default firstDayOfWeek for java.util.Calendar from SUNDAY to MONDAY. Is it
i'm trying to change the default look and feel for the spotify playlist generated
I was trying to change the compression of some gzip files from the default

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.