Open Bug 1058975 Opened 6 years ago Updated 6 years ago

Logged-in user profile not loaded when application with changed Environment Variables (path etc) launches browser


(Toolkit :: Startup and Profile System, defect)

31 Branch
Windows 8.1
Not set





(Reporter: grasmanek94, Unassigned)


User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0 (Beta/Release)
Build ID: 20140716183446

Steps to reproduce:

change ANY process' environment variables, then launch a http:// link with ShellExecute on Windows from within the process which environment variables have been changed.

Example of "changed environment variables":

        "LOGONSERVER": "\\\\User",
        "USERDOMAIN": "User",
        "COMPUTERNAME": "User",
        "USERNAME": "User",
        "NUMBER_OF_PROCESSORS": "8",
        "OS": "Windows_NT",
        "HOMEDRIVE": "Y:",
        "USERPROFILE": "Y:\\User",
        "PUBLIC": "Y:\\User",
        "HOMEPATH": "\\User",
        "APPDATA": "Y:\\User\\AppData",
        "LOCALAPPDATA": "Y:\\User\\AppData\\Local",
        "ALLUSERSPROFILE": "Y:\\User\\ProgramData",
        "ProgramData": "Y:\\User\\ProgramData",
        "ProgramFiles": "Y:\\User\\ProgramFiles\\x64",
        "ProgramFiles(x86)": "Y:\\User\\ProgramFiles\\x86",
        "ProgramW6432": "Y:\\User\\ProgramFiles\\x64",
        "CommonProgramFiles": "Y:\\User\\ProgramFiles\\Common\\x64",
        "CommonProgramFiles(x86)": "Y:\\User\\ProgramFiles\\Common\\x86",
        "CommonProgramW6432": "Y:\\User\\ProgramFiles\\Common\\x64",
        "TEMP": "Y:\\User\\TEMP",
        "TMP": "Y:\\User\\TEMP",
        "windir": "C:\\Windows",
        "VirtualGameSandBoxEmulatorDLLToInject": "",
        "VirtualGameSandBoxEmulatorOriginalDLLPath": "",
        "VirtualGameSandBoxEmulatorInjectionType": "NONE",
        "WindowsRuntimeArchitecture": "64"

VirtualizationProgram which is launching AProgram, and AProgram launches firefox, yet the VirtualizationProgram which launched the AProgram changes the environment variable %userprofile% or %appdata%.

Actual results:

Firefox started as if there is no firefox profile on the current logged-in user. (because %appdata% is pointing to a wrong path)

Expected results:

Firefox should use something like GetCurrentLoggedInUserProfile()\AppData\roaming\Mozilla\ to determine profile location instead of environment variable %appdata% or %user% because programs can change them before firefox starts.
Severity: normal → minor
Component: Untriaged → Startup and Profile System
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.