58

Is it possible to set Google chrome with a custom user profile as the default browser?

When I set google chrome as the default browser, it picks the "default" user profile as against the custom one I have setup. I tried setting google chrome as default browser after opening it from that particular user profile, but it doesn't seem to have an effect.

I googled around but could only find another poor soul like myself who asked a similar question here: http://www.google.com/support/forum/p/Chrome/thread?tid=69f0a6e776ceab1c&hl=en

There weren't any responses to that question.

6

19 Answers 19

18

The Solution that works for me is to

Open Regedit

Navigate to HKEY_CLASSES_ROOT\ChromeHTML\shell\open\command

Edit Default key Value to add --profile-directory varaible

i.e. Modify Default key Value data as: "< path to Chrome.exe >\chrome.exe" --profile-directory="< *name of your default directory* >" -- "%1"

2
  • 1
    If you have shortcuts to different "Persons"/Profiles, but want the default handler for links from external profiles to always go to one of them, then this is the best & sufficient answer. Thank you!
    – sparrowt
    Sep 6, 2016 at 7:00
  • 1
    This works for me, but then gets reset after an reboot, sadly.
    – Joe
    Sep 19, 2022 at 12:10
12

I did a search and replace of all the occurrences of chrome.exe in my registry with the specific command link. So,

"C:\Users\PROFILE-NAME\AppData\Local\Google\Chrome\Application\chrome.exe" -- "%1"  

was replaced with

"C:\Users\PROFILE-NAME\AppData\Local\Google\Chrome\Application\chrome.exe"  --user-data-dir="C:\Chrome Profile \location" --omnibox-popup-count=10 -- "%1"

everywhere and so far haven't run into any troubles. But there should definitely be a more easier/elegant way of doing this.

4
  • 4
    If using the native Chrome multi-user support, you'll want to instead use --profile-directory="Default", per superuser.com/questions/377186/… Oct 17, 2013 at 20:59
  • Does this kind of hack still work for you?
    – Alex S
    Aug 26, 2015 at 13:30
  • 1
    --omnibox-popup-count parameter is certainly not related, whatever it does. The omnibox is the fancy name for the address bar in chrome.
    – Domino
    Dec 13, 2017 at 19:03
  • The OP is unhappy that Chrome is using the “default” profile automatically,  so specifying --profile-directory="Default" seems like the wrong thing to do. Jun 6, 2019 at 16:47
8

Add a key of type REG_SZ (string) called UserDataDir under

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome

with the value of the user-data-dir that you'd like to use. The can be done with a single command line from the Command Prompt, as follows:

reg add "HKLM\SOFTWARE\Policies\Google\Chrome" /v UserDataDir /t REG_SZ /d "C:\Users\User1\chrome-profile" /f

The profile specified will be used as the default when Chrome is launched. This is confirmed to work in the current version of Chrome as of this writing -- version 70. The UserDataDir key was introduced to Chrome in version 11.

This way you don't have to use any command line arguments to chrome.exe and so you don't need to change the shell handlers for the various file types that chrome opens.

5
  • Looks promising; any idea what the equivalent on OSX is?
    – mklement0
    Nov 3, 2012 at 15:03
  • 3
    Unfortunately this registry key has precedence over the --user-data-dir command-line option so you won't be able to use different profiles
    – GetFree
    Dec 13, 2013 at 21:44
  • This just changes the default location where profiles are stored. it does not change what profile is used. this does not answer the question asked.
    – tlund
    Nov 14, 2015 at 17:14
  • 1
    This question is still valid today, so I've verified some of the information, confirmed the fix works on version 47 (current), and added a command to help with entering the registry key.
    – treehead
    Jan 14, 2016 at 16:04
  • @GetFree Same experience. Not that this helps, but it's documented behaviour
    – Frank N
    Mar 24, 2016 at 9:34
5

There's an explanation of how to use multiple Chrome profiles here.

The gist of it is to look inside

%USERPROFILE%\Local Settings\Application Data\Google\Chrome

(Windows XP)
or

%USERPROFILE%\AppData\Local\Google\Chrome

(Vista, Win7)

and copy the "User Data\Default" folder to "User Data\your_profile".

Then run chrome with some command-line options:

chrome.exe --user-data-dir="..\User Data\Your_profile" -first-run

and thereafter, you can run Chrome with that profile by using:

chrome.exe --user-data-dir="..\User Data\Your_Name"

And you can add that --user-data-dir option to a shortcut.

Now how you would use that setup for the default browser, I don't know. Might involve some tinkering in the Registry, around HKEY_CLASSES_ROOT\htmlfile\shell

0
2

I adopted the solution proposed by Rehan Khwaja above. Following the steps below will make Chrome launch from your new user location, you DO NOT need to edit shortcuts or any of that.

My exact steps were:

1. Create the folder structure you want use, for instance:
Y:\Profiles\Chrome\MyUserDataProfile

2. Follow Rehan Khwaja's steps in the registry by opening registry editor and creating this structure:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome
(I had to add the \Google\Chrome part as follows)
a) Right click on 'Policies' in the left pane of the registry editor
b) Select 'New Key' and call it: Google
c) Left click on your new key called Google (in the left pane of the registry editor, might have a folder icon next to it)
d) Now repeat steps a to c but left clicking on: Google, and creating a new key called: Chrome

3. Once you have the key called Chrome:
a) left click on it in the left pane of registry editor
b) right click in the RIGHT pane, and
c) Select: New > String Value
d) Name the string value: UserDataDir
e) Right click on your newly created UserDataDir
f) Select modify...
g) Under Value Data enter the path of your folder structure, for instance:
Y:\Profiles\Chrome\MyUserDataProfile
h) Select Ok
i) Close registry editor

Google Chrome will now launch from: Y:\Profiles\Chrome\MyUserDataProfile (by default, using all your standard shortcuts without having to edit their path's etc).

If you want to replicate your existing browsing environment in this new profile location, you can copy the entire contents of your old profile (or Chrome's default one) into your new path.

Windows 7 or 8 - Default Chrome Install Copy everything from:

%USERPROFILE%\AppData\Local\Google\Chrome\UserData
into
Y:\Profiles\Chrome\MyUserDataProfile

If you want to launch Chrome from different profiles with separate shortcuts for each, you will have make the shortcuts and edit the path's etc (as suggested in other posts).

2

Windows Solution

If you are using --user-data-dir for your shortcuts already, then this is what you're looking for.

This will make http:// and https:// links in other applications (eg. Skype) open in Chrome with the profile specified.

  1. Open Regedit (Run / WIN + R, type regedit, press enter)

  2. Locate the following keys:

    • HKEY_CLASSES_ROOT\http\shell\open\command
    • HKEY_CLASSES_ROOT\https\shell\open\command

    Edit the (Default) values of these keys to this:

    "YOUR_CHROME_PATH_HERE" --user-data-dir="YOUR_USER_DATA_PATH_HERE" -- "%1"

    Replace YOUR_CHROME_PATH_HERE with your Chrome.exe path, eg.

    C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

    Replace YOUR_USER_DATA_PATH_HERE with your Chrome User Data Folder, eg.

    P:\Libraries\Chrome Profile

    The default Chrome User Data Folder is located in

    %LOCALAPPDATA%\Google\Chrome\User Data

    Note: Can't use %variable% in Regedit.

3
  • Is this method official? How safe is this?
    – Pacerier
    Jul 13, 2015 at 6:19
  • 1
    All the boldz and capz.... urghhhhhhh...
    – Crowie
    Jun 9, 2016 at 23:25
  • @Pacerier I know it was a year ago but can you be specific about what 'official' recommendations you would like? By Google, Microsoft or Kaspersky software... or Knuth? [genuinely asking]
    – Crowie
    Jun 9, 2016 at 23:27
2

The way I get around this is

  1. If you want to open a particular profile rather than Chrome picking up the last open profile:

  2. If you are concerned about which profile is picked up by an external program

    • Swap the names of Default & Profile 1 directories here %LOCALAPPDATA%\Google\Chrome\User Data

    • i.e. rename Default to DefaultTmp, rename Profile 1 to Default, rename DefaultTmp to Profile 1

2

For multiuser systems with roaming profiles (ie. Terminal Server)

use:

reg add "HKLM\SOFTWARE\Policies\Google\Chrome" /v UserDataDir /t REG_SZ /d ${roaming_app_data}\Chrome /f

environment variable %appdata% wont work via registry. So use ${roaming_app_data} instead.

1

There is a setting within a global preferences file in the Chrome AppData directory that updates a "last_used" variable with the most recently used profile. You can reset/override this setting by setting it to your desired profile and it should simply use the profile you specified on the next app open. Otherwise using --profile-directory="Default" or --profile-directory="Profile 1" on your shortcuts will force a new window using that profile. You should NOT use --user-data-directory, as that is something completely different (sets/overrides the cache and settings directory path which the profile should already have defaults for).

The file mentioned above is the Local State file, which you could potentially parse to replace whatever profile is selected as the last used with your desired profile. See https://superuser.com/a/436262/333828

1

There are a lot of answers here but most of them seem to use HKEY_CLASSES_ROOT. This is a legacy key and really shouldn't be used any longer (to put into perspective, HKEY_CLASSES_ROOT comes from Windows 3.1 and was intended for backward compatibility). The correct place to make these changes is under HKEY_CURRENT_USER\Software\Classes\.

As mentioned all over the place here, Chrome stores each "profile" in its own directory. When launching, the --profile-directory command-line switch can be used to select a specific profile directory. Without this switch, Chrome will simply use whichever profile was last used. The default profile (the first user you logged in as after installing chrome) is always stored in the directory "default".

The simplest method for setting a profile is to simply edit Chrome's shortcut and add the command-line parameter --profile-directory="default":

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --profile-directory="Default"

The downside with this approach is that it only affects the shortcut itself. If Chrome is your default browser, and another application opens a page, this will have no effect. Similarly, if you associate a local file extension with Chrome, it will not affect which profile is selected when opening that file type from Windows Explorer.

The fix for this is to specify the profile to use in the Windows Registry. In order for this to work for both mapped extensions and shell execution, we need to make a change in two different places:

  1. HKEY_CURRENT_USER\Software\Classes\Applications\chrome.exe\shell\open\command

  2. HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ChromeHTML\shell\open\command

The default value for both of these are the same:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -- "%1"

Just as with the Shortcut method discussed previously, we simply need to add the --profile-directory="default" switch. One difference, however, it that here we need to add it between "chrome.exe" and -- "%1":

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --profile-directory="Default" -- "%1"

For a quick-n-dirty solution, create a file called ChromeDefault.reg and copy & paste the following into it:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Classes\Applications\chrome.exe\shell\open\command]
@="\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\" --profile-directory=\"Default\" -- \"%1\""

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ChromeHTML\shell\open\command]
@="\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\" --profile-directory=\"Default\" -- \"%1\""

Once saved, double-clicking this file will automatically make the necessary changes to your registry. This simply saves you the trouble of walking through the tree in RegEdit.

1

For Windows 10, I modified the following registry keys:

HKEY_CLASSES_ROOT\http\shell\open\command
HKEY_CLASSES_ROOT\https\shell\open\command
HKEY_CLASSES_ROOT\ChromeHTML\shell\open\command

All with this value:

"C:\Program Files\Google\Chrome\Application\chrome.exe" --profile-directory="Default" -- "%1"

(or if you have the 32bit version of chrome):

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --profile-directory="Default" -- "%1"

And just an extra note, none of it worked until I modified the last key (the third above) HKEY_CLASSES_ROOT\ChromeHTML\shell\open\command, so that may be all that was needed. I only found that key because of this answer.

1
  • For Windows 11, my http and https registry keys were tied to Internet Explorer (yes, that old app) despite my OS profile having the default browser set to Chrome. I also noticed a second key that looked like it handled a redirect from IE to something else. The something else was a DLL with "proxy" in the name. In the end, I only had to set the HKCR\ChromeHTML key. And it is now 2023, I needed "Program Files", not "Program Files (x86)".
    – Zarepheth
    Oct 4, 2023 at 14:33
0

I have a solution for MacOSX. I have used an Automator to create Folder Action on ~/Library/Application Support/Google/Chrome. When the Chrome application quits, it creates some unimportant shutdown file in this directory. This triggers a folder action. If the last profile used was not the Default it runs this script, to modify saved profile:

cd ~/Library/Application\ Support/Google/Chrome
if ! grep '"last_used": "Default"' Local\ State >/dev/null; then
    sed -e 's/"last_used":.*/"last_used": "Default",/' \
        -e 's/"last_active_profiles":.*/"last_active_profiles": [ "Default" ],/' \
        -i .bak Local\ State
    say "Chrome Default Profile Set"
fi

Next time you start Chrome (anyhow), it will start with the Default profile.

0

For the sake of completeness, I'll add another solution which aparently did work in the past, but at least for me (WinVista, Chrome 31) does not.
http://productforums.google.com/forum/#!topic/chrome/4F9bjXogI0s

The solution is to make the User Data folder a hard-link (an NTFS junction) to your actual profile folder, like this:

mklink /J "C:\Users\<user_name>\AppData\Local\Google\Chrome\User Data" "C:\myDefaultGoogleProfile"
0
  • Open Chrome
  • Top right corner of the browser click the icon that looks like three horizontal lines and in the drop down menu select "Settings."
  • Select "DISCONNECT YOUR GOOGLE ACCOUNT" at the top of the screen that appears.
  • Click through the prompts to complete the account removal process.
  • When there are no accounts associated with Chrome re-add the account you want to use as the default one FIRST then any subsequent accounts you want after that.
  • That is what I did to make MY preferred user profile be the one active when launching Chrome.
1
  • Question is about making Chrome Default Browser with specific profile not a particular profile default
    – clhy
    Jan 16, 2016 at 5:28
0
  1. Open Chrome with the desired profile
  2. Navigate to chrome://version/ and copy the value of the Command Line field
  3. Open Regedit key HKEY_CLASSES_ROOT\ChromeHTML\shell\open\command
  4. Set value to the Command Line field copied above, with "%1" added at the end
# example: 
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --profile-directory=Default --flag-switches-begin --flag-switches-end --enable-audio-service-sandbox "%1"
0

For Windows 10 (No need to change registry)

  1. Type in Chrome on the search bar.
  2. Right click on Chrome and select Open file location (A new window will pop-up)
  3. Right click on Chrome shortcut (on the new window) and select Properties.
  4. Locate the Target text box and add the following text to the end of the text box value.

--profile-directory="Profile 1"

Change the Profile 1 to the corresponding Person that you want to be the default Person when you open up chrome. (The first person in the person list is Profile 1, the second person is Profile 2, and so on..)

NOTE: add space before inserting the text

ANOTHER NOTE: If you have a desktop shortcut for Chrome, skip Steps 1 and 2.

1
  • Oh, you've deleted your comment.. well..
    – Gilromeo
    Feb 21, 2021 at 19:39
-1

I found an easy solution to this. I'm running Chrome Version 33.0.1750.117 m. I found that when I open my 2nd profile, Chrome creates another task in the Windows 8 task bar and the new Chrome task has a barely perceptible icon difference, it has the profile picture you've chosen for your new profile. In my case, there's a tiny Superman on the lower right corner of the Chrome icon.

Simply pin that icon to to your task bar and unpin the old icon.

I have tested this and it works for me. Even if the last instance of Chrome I close out is the old profile (which I am retaining), the new profile is opened when I open Chrome.

1
  • This does not change the profile that is used for launching chrome when you click a link somewhere.
    – tlund
    Mar 29, 2016 at 0:17
-2

No way to do it. Chrome always opens any external link from the active user or the last user you have switched to.

-2

It's way easier than that -- just go into the Chrome users, click on the user you want to be default, and click the "Edit" button. Then, click to create a desktop shortcut that will make a shortcut straight to that user. Bingo!

1
  • 1
    This does not change the profile that is used for launching chrome when you click a link somewhere.
    – tlund
    Nov 14, 2015 at 17:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .