-p "Name". Nicht -p "Ordner", für Ordner wäre es eh -profile
https://wiki.mozilla.org/Firefox/CommandLineOptions
Namen und Ordner stehen in der profiles.ini.
HA ![]()
Danke .DeJaVu für diesen Link!
Es gibt eine keine Änderung, was den Aufruf zum Profilmanager betrifft!
JavaScript
// JavaScript Document
// QuickProfilesChangesButton.uc.js
// Source file https://www.camp-firefox.de/forum/thema/136664/?postID=1231647#post1231647
// Version 1.03 from July 26, 2023
(function() {
if (location.href !== 'chrome://browser/content/browser.xhtml') return;
try {
CustomizableUI.createWidget({
id: 'aboutprofiles-button',
type: 'custom',
defaultArea: CustomizableUI.AREA_NAVBAR,
onBuild: function(aDocument) {
let toolbaritem = aDocument.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'toolbarbutton');
let currentProfileDirectory = Services.dirsvc.get("ProfD", Ci.nsIFile).path.replace(/\\/g, "/"); // Profilpfad zum Ordner des Symbols
let buttonicon = "user-group_2.svg"; // Name & Dateiendung des anzuzeigenden Symbols. Hier "XXX.xxx" das eigene Symbol inkl. Dateiendung eintragen
toolbaritem.onclick = event => onClick(event);
var props = {
id: 'profileschange-button',
class: 'toolbarbutton-1 chromeclass-toolbar-additional',
removable: 'true',
label: 'Profil zusätzlich starten',
accesskey: '',
tooltiptext: 'Quicklink: Profile Changer',
style: 'list-style-image: url("' + ("file:" + currentProfileDirectory + "/chrome/icons/" + buttonicon) +'");',
};
for (var p in props)
toolbaritem.setAttribute(p, props[p]);
return toolbaritem;
}
});
} catch(e) { };
function onClick(event) {
if (event.button != 0){
return;
}
let file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
// let arguments = ["-no-remote", "-P", "Standard-Benutzer"]; // Profil wird ausgewählt Hier "XXX" das gewünschte Profil eintragen, z.B. Test
let arguments = ["-no-remote", "-P"]; // Wer lieber den Profilmanager aufrufen möchte,nutzt diese Zeile!
file.initWithPath("C:\\Program Files\\Mozilla Firefox\\firefox.exe"); // Pfad zur Firefox-Installation
// file.initWithPath("/Applications/Firefox.app/Contents/MacOS/firefox"); // Pfad zur Firefox-Installation, Dateipfad für Mac User
let process = Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess);
process.init(file);
process.run(false, arguments, arguments.length); // Profil wird bestätigt
}
})();
Alles anzeigen