Protecting Mozilla's registry.dat file from Windows and Internet Explorer

The easyest way to put into place the registry.dat file for a user would theoretically be to put it into the user's profile directory on the server. However, this issue is problematic, because:

In order to prevent this, it's preferable to have mozilla's registry.dat file copied over from the server using the logon script. Moreover, it's advisable to "protect" the mozilla registry using attrib +r +s in case the logon script is finished before IE's "Personnalized settings" have completed their dirty deed...

In summary, you can use the following series of commands in your logon script (usually stored in /home/samba/netlogon/STARTUP.BAT on the server):


rem ==================================================
rem Mozilla
rem ==================================================
attrib -r -s "%USERPROFILE%\Application Data\Mozilla" >NUL 2>NUL
attrib -r -s "%USERPROFILE%\Application Data\Mozilla\registry.dat" >NUL 2>NUL
mkdir "%USERPROFILE%\Application Data" >NUL 2>NUL
mkdir "%USERPROFILE%\Application Data\Mozilla" >NUL 2>NUL
copy /b \\server\netlogon\template\"Application Data"\Mozilla\registry.dat "%USERPROFILE%\Application Data\Mozilla" >NUL 2>NUL
attrib +r +s "%USERPROFILE%\Application Data\Mozilla" >NUL 2>NUL
attrib +r +s "%USERPROFILE%\Application Data\Mozilla\registry.dat" >NUL 2>NUL
regedit /s \\server\netlogon\reg\quicklaunch.reg >NUL 2>NUL