I found that my Chrome profile was occasionally switched to older account, and I'd like to lock my current profile. Is there a way to do so? Either through policy or regedit or even some scripting is welcome.
1 Answers
Chrome always starts with the last-open profile that was being used before Chrome closed. But, it is possible to start Chrome with a specific profile with the --profile-directory="name of profile" option.
Here, "name of profile" follows the naming convention Default, "Profile 1", "Profile 2" etc. provided you added the profiles using the Add person option in Chrome. There's a detailed explanation about it here.
There is no reliable way to ensure that Chrome always starts with a specific profile, but there are some ways to get it working temporarily.
(I am assuming you are using Chrome on Windows because you have tagged the question as windows-10)
To make sure Chrome always starts with a particular profile when you open it, you can suffix the --profile-directory="name of profile" argument to all the Chrome shortcuts on your taskbar, start menu, Desktop, etc.
Note: Make sure you don't edit the All Users shortcut located in \ProgramData\Microsoft\Windows\Start Menu on a multi-user system otherwise you might break Chrome for other users of the PC, plus you need admin rights for that. A better way would be to create a new Chrome shortcut for your current user account in \Users\user_name\AppData\Roaming\Microsoft\Windows\Start Menu and edit that instead.
To make Chrome start with a specific profile when you click a link elsewhere or use the open with option and select Chrome, you can suffix the --profile-directory="name of profile" argument to the HKEY_CLASSES_ROOT\ChromeHTML\shell\open\command registry key.
The details of this are already included in the answer for this question here. You don't need to worry about messing with multi-user settings (see details here). However, from personal experience, this setting does get reset to the default value (i.e. with no particular profile directory) once in a while, possibly when Chrome updates.
- 746