Chome – How to change user-data directory

As you may have known Chrome stores user data in a default directory. You can find this location easily by typing into address bar chrome://version, you’ll get result like below screenshot:

chrome-version

Its path on Windows is “C:\Users\[account]\AppData\Local\Google\Chrome\User Data”, in this case, mine is “C:\Users\Ben\AppData\Local\Google\Chrome\User Data”, and Default is directory of Default profile.

Let’s say you want to assign user data directory into another location, even different drive Volume, I’ll choose “D:\AppData\Chrome” as an example.

Chrome support an option variable on command line to assign user data directory on startup, which is –user-data-dir. Open the command line, go to Chrome Executable Path “C:\Program Files (x86)\Google\Chrome\Application”; type in:

chrome.exe  –user-data-dir=“D:\AppData\Chrome”

I’ll have another Chrome instance with new user data directory, I can check it by typing chrome://version as above:

chrome-command--user-data-dir-version

You can notice that Default profile directory is also created.

That’s great, the next step you can think of is creating a shortcut to Chrome with this option, so that you can just click on it to open. That’s right, I now can create a shortcut with Target path as:

“C:\Program Files (x86)\Google\Chrome\Application\chrome.exe” –user-data-dir=”D:\AppData\Chrome”

But what if you want to make this as a default behavior, so that whenever you click on any hyperlink, Chrome will be opened with this user data dir?

We can do this by creating a symbolic link with path as the default user data dir to your new dir. Steps are below:

  • Close all Chrome windows to release lock on folder User Data.
  • Go to “C:\Users\[account]\AppData\Local\Google\Chrome”.
  • Delete User Data directory, you can copy to somewhere as a backup.
  • Open Command Prompt(Run as Administrator), go to “C:\Users\[account]\AppData\Local\Google\Chrome” create a symbolic link “User Data” to “D:\AppData\Chrome”, as below screenshot:

chrome-user-data-dir-symbolic-link

 

That’s it, from now on, even you open default Chrome shortcut on desktop or click some link, your custom user data directory is loaded.

Leave a Reply

avatar
  Subscribe  
Notify of