I have 3 profiles created in Google Chrome (added from Chrome's GUI, not manually). They work okay, if a new window is opened under different profile from GUI (using user icon in the upper left corner of the window).

I need to start Chrome with specific profile from command line.

According to documentation, it is possible by the command line option --user-data-dir=profile-path-and-name, which is in my case looks like "path-to-windowsxp-user-profile\Local Settings\Application Data\Google\Chrome\User Data\ProfileName".

I added this string into a shortcut. When it runs first time, I get a message box saying that importing data from Mozilla and Chrome is not possible (this might be related to the fact that I have FireFox as well, and it is running, but import is not important to me).

The most important problem is that, when Chrome runs second time (and others), it opens window without current user icon in the upper left corner, and shows a message bar at upper side of the window, stating that Chrome is not default browser.

Moreover, if I open settings from such window, the browsers "says" that this is the only and default profile on the PC. (Of course, if I start the browser without --user-data-dir it shows multiple profiles again, and allows for switching between them using GUI.)

1 Answer
1

It turned out that profiles, added from Chrome UI, are actually user accounts inside the same profile, and they do not work with --user-data-dir parameter in command line as ordinary profiles.

When a new user is created from GUI, Chrome creates a new folder inside User Data directory, for example Profile 1. By default, there is Default folder there, used for default user.

In order to create a fully-functional profile, acceptable for --user-data-dir, one should create a copy of entire User Data directory (including, apart from Default, other subfolders, such as Temp and PepperFlash, and some files in User Data with a local state). This can be done by any file-manager. Also a new empty profile can be created by launching Chrome with --user-data-dir parameter, passing to it a full path to new (non-existent) folder.