Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

How Mozilla finds its configuration files

How Mozilla finds its configuration files

Mozilla looks into the binary %USERPROFILE%\Application Data\Mozilla\registry.dat file for its "registry", which contains, amongst other information, a pointer to the directory where the profile is stored (located at Common/Profiles/profileName/directory. The value contained in this key is a litteral value, no variables (such as %USERPROFILE%/MozProfile) allowed. We chose to point this to the user's home directory (H:\Mozilla).

The configuration itself is stored in the specified directory, in a file named prefs.js. This is a readable file of javascript commands. All other files in that directory are dynamically created by Mozilla on first start.

The of the binary registry file is described here.

You may use the following items:

  • A program to convert registry.dat file into a readable (and editable) XML file. Usage: ./readMozProfile.pl < registry.dat >registry.xml
  • A program to convert the XML file back into the binary registry.dat file. Usage: ./writeMozProfile.pl < registry.xml >registry.dat
  • A ready-to-use registry.dat file pointing to H:\Mozilla
  • A registry.xml file pointing to H:\Mozilla
  • An example of a prefs.js file (to put into the user's H:\Mozilla directory). If you use the userd system from the LLL project, you can generate this automatically with the user's personal values by using this template file prefs.js.tmpl

N.B. Mozilla includes a profile manager, but unfortunately this always include a random part (salt) into the profile's filename, and thus cannot be used to point Mozilla to a profile of the our chosing.

N.B. The above scripts have been tested with perl-5.8.0, XML-Parser-2.34, XML-SAX-0.13 and XML-Simple-2.14. Different versions of perl, or of these modules may lead to bugs. If you have trouble gettings these scripts to work on your system, there is also an online version available.

Document Tags and Contributors

 Contributors to this page: teoli, Kohei, Alain Knaff
 Last updated by: teoli,