Az oldal korlátolt funkcionalitással fog rendelkezni, amíg elvégezzük a felhasználói élményt javító karbantartást. Ha egy leírás nem oldja meg a problémáját, és kérdést tenne fel, akkor a támogatási közösségünk a @FirefoxSupport Twitter oldalon tud segíteni, vagy az /r/firefox oldalon a Redditen.

Támogatás keresése

Kerülje el a támogatási csalásokat. Sosem kérjük arra, hogy hívjon fel egy telefonszámot vagy osszon meg személyes információkat. Jelentse a gyanús tevékenységeket a „Visszaélés bejelentése” lehetőséggel.

További tudnivalók

A témacsoportot lezárták és archiválták. Tegyen fel új kérdést, ha segítségre van szüksége.

How can I determine programatically if firefox is running with my extension installed. I need to do this from an OSX cocoa application.

  • 6 válasz
  • 1 embernek van ilyen problémája
  • 1 megtekintés
  • Utolsó üzenet ettől: sp.anon.me

more options

I need to determine programatically if firefox started with a profile that has my extension installed. I need to do this from an OSX Cocoa application. Is there a way to determine the current profile being used by firefox? Or is there a way to determine if a particular extension is installed for the current profile?

I need to determine programatically if firefox started with a profile that has my extension installed. I need to do this from an OSX Cocoa application. Is there a way to determine the current profile being used by firefox? Or is there a way to determine if a particular extension is installed for the current profile?

Kiválasztott megoldás

jscher2000 said

The parent.lock file in a running profile folder will be locked, while in other profile folders it can be opened (blank file). Not sure what over method you could use.


Thanks for your response. I checked the .parentlock file in the profile being used by firefox. It is not locked. I tried to manually check (using getinfo on the file on mac) and also programatically using NSFileManager attributesOfItemAtPath (looking for the NSFileImmutable key). Both indicate the file is not locked. Am i missing something?

I did find that the FileModificationDate on the .parentlock file of the current profile being used will be the latest when compared to other profiles. I am using this to determine the current profile that firefox is using. Thank you !

Válasz olvasása eredeti szövegkörnyezetben 👍 0

Összes válasz (6)

more options

Maybe install the extension globally to ensure that the extension is installed.

You can parse extensions.json in the profile folder to see what extensions are installed.

You can use the button on the "Help -> Troubleshooting Information" (about:support) page to go to the current Firefox profile folder or use the about:profiles page.

more options

Thanks for the reply. I need to know what profile is being used so I can parse the extensions.json file. I can do this manually by browsing to the about:profiles page. But, I need to programatically determine the current profile being used by firefox. How can I do this?

Módosította: sp.anon.me,

more options

The parent.lock file in a running profile folder will be locked, while in other profile folders it can be opened (blank file). Not sure what over method you could use.

more options

Note that each platform uses its own methods and files to lock a profile.

more options

Thanks for your response. I checked the .parentlock file in the profile being used by firefox. It is not locked. I tried to manually check (using getinfo on the file on mac) and also programatically using NSFileManager attributesOfItemAtPath (looking for the NSFileImmutable key). Both indicate the file is not locked. Am i missing something?

more options

Kiválasztott megoldás

jscher2000 said

The parent.lock file in a running profile folder will be locked, while in other profile folders it can be opened (blank file). Not sure what over method you could use.


Thanks for your response. I checked the .parentlock file in the profile being used by firefox. It is not locked. I tried to manually check (using getinfo on the file on mac) and also programatically using NSFileManager attributesOfItemAtPath (looking for the NSFileImmutable key). Both indicate the file is not locked. Am i missing something?

I did find that the FileModificationDate on the .parentlock file of the current profile being used will be the latest when compared to other profiles. I am using this to determine the current profile that firefox is using. Thank you !

Módosította: sp.anon.me,