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 (
The configuration itself is stored in the specified directory, in a file named
The of the binary registry file is described here.
You may use the following items:
- A program to convert
registry.datfile 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.datfile pointing to
registry.xmlfile pointing to
- An example of a
prefs.jsfile (to put into the user's
H:\Mozilladirectory). 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
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.