Where profiles.ini
is read from isn't exactly something you can influence. Given that no profile is selected at this point, your add-on obviously isn't active yet. Also, any preferences your add-on could write aren't active either because these would be stored in the profile as well. And if you look at the actual implementation - there is indeed no configurability here, the profiles.ini
file is always looked up in userApplicationDataDir
. On Linux you could manipulate that value by setting the HOME
environment variable differently, this approach won't work on Windows or OS X however - OS functions are used to locate the home directory there.
So what you could do is bypassing profiles.ini
completely by passing in -profile c:\foo\bar
command line option when you run Firefox, this will make Firefox use the specified profile directory. Other than that there isn't much you can do.