Make Google chrome with specific user profile as default browser

Solution 1:

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"

Solution 2:

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.

Solution 3:

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.