Code:
user_pref("beacon.enabled", false);
user_pref("browser.customizemode.tip0.shown", true);
user_pref("browser.download.lastDir", "D:\\Users\\FerchogtX\\Downloads");
user_pref("browser.download.panel.shown", true);
user_pref("browser.download.useDownloadDir", false);
user_pref("browser.startup.homepage", "about:newtab");
user_pref("browser.tabs.remote.autostart", true);
user_pref("browser.taskbar.previews.enable", true);
user_pref("browser.uiCustomization.state", "{\"placements\":{\"PanelUI-contents\":[\"edit-controls\",\"zoom-controls\",\"new-window-button\",\"privatebrowsing-button\",\"save-page-button\",\"print-button\",\"history-panelmenu\",\"fullscreen-button\",\"find-button\",\"preferences-button\",\"add-ons-button\",\"developer-button\",\"ublock0-button\"],\"addon-bar\":[\"addonbar-closebutton\",\"status-bar\"],\"PersonalToolbar\":[\"personal-bookmarks\"],\"nav-bar\":[\"urlbar-container\",\"search-container\",\"bookmarks-menu-button\",\"pocket-button\",\"downloads-button\",\"home-button\",\"loop-button\"],\"TabsToolbar\":[\"tabbrowser-tabs\",\"new-tab-button\",\"alltabs-button\"],\"toolbar-menubar\":[\"menubar-items\"]},\"seen\":[\"ublock0-button\"],\"dirtyAreaCache\":[\"PersonalToolbar\",\"nav-bar\",\"TabsToolbar\",\"toolbar-menubar\",\"PanelUI-contents\",\"addon-bar\"],\"currentVersion\":4,\"newElementCount\":0}");
user_pref("browser.urlbar.suggest.searches", true);
user_pref("devtools.responsiveUI.currentPreset", "320x480");
user_pref("devtools.responsiveUI.customHeight", 160);
user_pref("devtools.responsiveUI.customWidth", 240);
user_pref("devtools.responsiveUI.rotate", false);
user_pref("devtools.telemetry.tools.opened.version", "{\"DEVTOOLS_TOOLBOX_OPENED_PER_USER_FLAG\":\"43.0.4\",\"DEVTOOLS_OS_ENUMERATED_PER_USER\":\"43.0.4\",\"DEVTOOLS_OS_IS_64_BITS_PER_USER\":\"43.0.4\",\"DEVTOOLS_SCREEN_RESOLUTION_ENUMERATED_PER_USER\":\"43.0.4\",\"DEVTOOLS_INSPECTOR_OPENED_PER_USER_FLAG\":\"43.0.4\",\"DEVTOOLS_RULEVIEW_OPENED_PER_USER_FLAG\":\"43.0.4\",\"DEVTOOLS_OPTIONS_OPENED_PER_USER_FLAG\":\"42.0\",\"DEVTOOLS_RESPONSIVE_OPENED_PER_USER_FLAG\":\"43.0.1\",\"DEVTOOLS_COMPUTEDVIEW_OPENED_PER_USER_FLAG\":\"43.0.4\",\"DEVTOOLS_STYLEEDITOR_OPENED_PER_USER_FLAG\":\"43.0.4\",\"DEVTOOLS_JSDEBUGGER_OPENED_PER_USER_FLAG\":\"43.0.4\"}");
user_pref("devtools.theme", "dark");
user_pref("devtools.toolbox.host", "window");
user_pref("devtools.toolbox.previousHost", "bottom");
user_pref("devtools.toolbox.selectedTool", "inspector");
user_pref("devtools.toolsidebar-width.inspector", 0);
user_pref("dom.ipc.plugins.flash.disable-protected-mode", true);
user_pref("general.smoothScroll", false);
user_pref("layers.async-pan-zoom.enabled", true);
user_pref("layers.offmainthreadcomposition.testing.enabled", true);
user_pref("layout.spellcheckDefault", 0);
user_pref("privacy.donottrackheader.enabled", true);
user_pref("privacy.trackingprotection.enabled", true);
Also, when you want to restore a Profile, first create the folder (either in the default %appdata% location, or a custom one, you can make Firefox to point to that place later with the switch -profilemanager) then you place this files before doing a new profile (so that passwords don't get reseted), then you create your profile, Firefox will start with all your settings restored.