What file is the option "Opera Directory" stored in?

  • Which file is it? This is where the "Path to user data directory" is stored

  • In Opera Presto, it's operaprefs_default.ini or similar if i'm not mistaken.

  • In Opera Presto, it's operaprefs_default.ini or similar if i'm not mistaken.

    Don't think that is it, here's what's in mine...

    And forgot to add 64 bit, 12.16 Win 7

    Opera Preferences version 2.1
    ; Do not edit this file while Opera is running
    ; This file is stored in UTF-8 encoding

    [System]
    Multi User=0

    [User Prefs]
    Language Files Directory={Resources}locale\en
    Language File={Resources}locale\en\en.lng

    [Auto Update]
    Country Code=US

  • I don't think that particular folder path lives in operaprefs.ini. I do know it can be altered using opera:config, but I'm not sure in which file that entry then gets placed (opera:config uses other file(s) besides just operaprefs.ini for some of its data). I've never altered that particular path to test what file might get altered. During installation, Opera sets registry keys that correspond to the main Opera folder name defined by the installer (or by the user if he over-rides the default), and that somehow ripples as default into the appropriate user accounts under similarly-named user/appdata sub-folders. Whatever file contains the Opera directory path has its path data set at that installation time, until the user later chooses to alter it.

  • With operaprefs.ini, the way things works is that if the preference isn't in the file, Opera uses its default value for that preference. When, the preference is in operaprefs.ini, it means the user has changed the value of that preference at one time. The value is what it is. It could match the default or it could be something else.

    This is all useful when upgrading Opera where the default value for a setting has changed in the new version. If the user never messed with the setting, Opera will use the new default value. If the user messed with the setting before, Opera will still use the same value that's in operaprefs.ini so that it doesn't change settings on the user.

    There are exceptions with some preferences though.

    The "Opera Directory" setting by default points to the roaming profile folder. The "Opera Local Directory" setting points to the local profile folder. For a usb install, where you have a "profile" folder, "Opera Directory" and "Opera Local Directory" will be the same (the "profile" directory).

    Just because you see an actual path for a setting in opera:config, that doesn't mean the setting has actually been changed and is in operaprefs.ini. The path you see might just be Opera's default path that it's using. Checking operaprefs.ini with a text editor will tell you though for sure. Take a look at the path for "Windows Storage File" for example, The default path doesn't even have the correct filename at the end.

    For preferenceg files, remember that Opera has operaprefs_default.ini in the program files directory, operaprefs.ini in the user's roaming profile directory, and operaprefs_fixed.ini in the system32 directory.

    operaprefs_default.ini is your base settings that apply to all users. operaprefs.ini is the user preferences that can override operaprefs_default.ini. operaprefs_fixed.ini, overrides the others and forces settings upon users.

    Now, you can set "Opera Directory" and "Opera Local Directory" if you want (under the User Prefs section). And, you can set it in any of the files to get the effect you want. However, Opera can be pretty buggy with these settings.

    Last time I checked, when you set them in operaprefs.ini, only some of the preference files will be stored in the location you set. Others will remain in the roaming profile folder (including operaprefs.ini). In other words, you can't just use operaprefs.ini to change the Opera Directory so that opera totally uses the operaprefs.ini path you specify for everything else. If you could, you could imagine a whole level of operaprefs.ini files changing the Opera Directory to point to the next one. I think it only works for changing the location of some of the preference files. I consider this a bug and think I filed on it once. Don't remember the bug, but I don't think it received any attention as it was just too much of a corner case.

    Now, you might be able to get away with setting Opera Directory and or Opera Local Directory in operaprefs_default.ini. I forget if that works fine. I vaguely remember it not working fine for a usb installation though. I think maybe Opera still put some preference files in the "profile" directory even though both "Opera Directory" and "Opera Local Directory" were both changed to other folders (different from each other even). But, even if this works for a normal Opera install, it'd cause all users to use the same folder, which doesn't make sense unless those folders are in a spot that's accessible (read and write) to all users and no user was using them at the same time.

    As for operaprefs_fixed.ini, since it's just an override, I think the Opera Directory and Opera Local Directory settings in it will indeed override the others. Just don't know if you'd run into the same bug as with the other situations.

    In short, play around with the settings if you want. But, don't be surprised if it creates a mess.

  • Wow Burnout my head hurts after reading all of that!!!! 🙂 It seems some of those profile settings used to be in the ini file when it was called opera6.ini (I think that was the name of it).

    I yearn for the day of simple txt files in the installed dir where you could easily change settings.

    Thanks as always for a very complete answer.

  • Nice comprehensive post, @burnout426. I've filed it away for future reference. This stuff is getting harder and harder to find any more.

Log in to reply
 

Looks like your connection to Opera forums was lost, please wait while we try to reconnect.