Creating this to copy the Mozilla.cfg and local-settings.js files to any machine that has firefox installed.
Basically needing a script to find the path firefox is installed, change the path to a variable and then copy two files to the Mozilla install directory. writing it as a batch file but if you have a powershell script that will work that would be fine too. This needs to be able to un on windows 7 machines. It will be applied to the computer group policy script setting.
This is what I have so far. I'm having a problem deleting the \firefox.exe from the end of the path. Its only pulling the path directly to the firefox.exe.
FOR /F "tokens=1,2* delims= " %%i in ('reg query "HKLM\Software\Clients\StartMenuInternet\FIREFOX.EXE\shell\open\command" /s ^| find "Default"') do SET user_ffx_location=%%k
copy \\fileshare\share\mozilla.cfg "%user_ffx_location%\mozilla.cfg"
copy \\fileshare\share\local-settings.js "%user_ffx_location%\pref\local-settings.js"