I found lots of old suggestions on getting Firefox to backup but the part that bugged me the most was that it went against Microsoft's suggestion of not modifying the original xml files. For good reason too, because they could be replaced and you would lose your customizations. I also found that the suggestions didn't work because of changes in the newer versions of Firefox. Below I will post the code that works with new versions of Firefox, hopefully it will help others.
Now if anyone knows how to get Chrome to work, I'd appreciate that. I'm working on it, but no need to reinvent the wheel if someone has working code already.
This is just the firefox section, it will not work if you only save this code without the required xml and migration tags.
Note: As best as I could tell the lastest version of Firefox writes to HKLM\Software\Mozilla\Mozilla Firefox\*.*\Main and not to bin where the previous code was looking.
<!-- Mozilla Firefox --><component context="UserAndSystem" type="Application"><displayName>Firefox</displayName><environment name="GlobalEnv"/><environment name="GlobalEnvX64"/><paths><path type="File">%CSIDL_APPDATA%\Mozilla\Firefox\</path></paths><role role="Settings"><detection><conditions><condition>MigXmlHelper.DoesObjectExist("Registry","%HklmWowSoftware%\Mozilla\Mozilla Firefox *.*\bin [PathToExe]")</condition><condition>MigXmlHelper.DoesObjectExist("Registry","%HklmWowSoftware%\Mozilla\Mozilla Firefox\*.*\Main [PathToExe]")</condition></conditions></detection><rules context="User"><destinationCleanup><objectSet><pattern type="File">%CSIDL_LOCAL_APPDATA%\Mozilla\Firefox\Profiles\*\Cache\* [*]</pattern></objectSet></destinationCleanup><include><objectSet><pattern type="File">%CSIDL_APPDATA%\Mozilla\Firefox\* [*]</pattern><pattern type="File">%CSIDL_LOCAL_APPDATA%\Mozilla\Firefox\Profiles\* [*]</pattern></objectSet></include><exclude><objectSet><pattern type="File">%CSIDL_APPDATA%\Mozilla\Firefox\Crash Reports\* [*]</pattern><pattern type="File">%CSIDL_APPDATA%\Mozilla\Firefox\Profiles\*\ [pluginreg.dat]</pattern><pattern type="File">%CSIDL_LOCAL_APPDATA%\Mozilla\Firefox\Profiles\*\Cache\* [*]</pattern></objectSet></exclude><merge script="MigXmlHelper.SourcePriority()"><objectSet><pattern type="File">%CSIDL_APPDATA%\Mozilla\Firefox\* [*]</pattern><pattern type="File">%CSIDL_LOCAL_APPDATA%\Mozilla\Firefox\Profiles\* [*]</pattern></objectSet></merge></rules></role></component>
If this post is helpful please vote it as Helpful or click Mark for answer.