Google Chrome, Lab Computers, Roaming Profiles

Google Chrome is big here at OSU Chemistry (where isn’t it!?). I really wanted to get it working well for my windows 7 migration project.

Chrome provides two major challenges for us Windows IT folk:

  1. It installs per-user to the local user profile, under “%LOCALAPPDATA%\Google\Chrome”, meaning that it can’t be installed for all users.
  2. It keeps it’s data inĀ “%LOCALAPPDATA%\Google\Chrome”, meaning that the data doesn’t roam.

Problem 1 is actually very easy to solve. To install Chrome for all users in the %programfiles% directory, download and install Chrome via Google Pack. Anything installed via Google Pack is automatically in Program Files for all users.

Problem 2 is where things get tricky. After reading around on the forums, I tried the following ‘workarounds’:

  1. Opening Chrome with the –user-dir-path=”\\fileserver\usershare$\chromeData”. This seemed to work at first, then I realized that double-clicking an HTML file wouldn’t start chrome with the startup flag, so the profile doesn’t load. I then tried modifying the ChromeHTML filetype association in the registry, but it doesn’t allow for variables. When trying –user-dir-path, it expanded literally to “\\<fileserver>\username$\ChromeData”.
  2. Opening Chrome with the –user-dir-path=”Z:\chromeData” where Z: is the locally mapped home folder. This also seemed to work but wouldn’t load web pages. Picking a local folder on C worked fine.
  3. Making a symbolic link to the Z:\ mapped home folder. Chrome would open, but wouldn’t install any extensions.

So I tried saving %localappdata%\google\chrome\Default to the user’s share on logout, and restoring it on login with scripts. This works! Then I noticed that the local Chrome cache on my workstation is something like 600MB. This is not an acceptable solution.

The “Fix”

But, what about Google’s “sync” feature? I wondered if it would be possible to copy only a few necessary files, and if Google Sync would do the rest. This way, at least users could sign in\up for google sync and their bookmarks, preferences, and passwords would still roam. Turns out this works, and you need to copy up\down the following files:

  • Login Data
  • Preferences
  • Web Data

This way, at least the user can set up ‘Google Sync’ to their Google Account, which will roam to any workstation (but without their history). I haven’t tested this with extensions.

The Scripts


REM Save-ChromeData.cmd

IF NOT EXIST \\winfs\%username%$\profile\chromedata MKDIR \\winfs\%username%$\profile\chromedata
IF EXIST "C:\Users\%username%\appdata\local\google\chrome\user data\default" COPY /Y "C:\users\%username%\AppData\Local\Google\Chrome\User Data\Default\Web Data" \\winfs\%username%$\profile\chromedata
IF EXIST "C:\Users\%username%\appdata\local\google\chrome\user data\default" COPY /Y "C:\users\%username%\AppData\Local\Google\Chrome\User Data\Default\Login Data" \\winfs\%username%$\profile\chromedata
IF EXIST "C:\Users\%username%\appdata\local\google\chrome\user data\default" COPY /Y "C:\users\%username%\AppData\Local\Google\Chrome\User Data\Default\Preferences" \\winfs\%username%$\profile\chromedata



REM Restore-ChromeData.cmd

IF EXIST "\\winfs\%username%$\profile\chromedata" COPY /Y "\\winfs\%username%$\profile\chromedata\Web Data" "C:\users\%username%\AppData\Local\Google\Chrome\User Data\Default"
IF EXIST "\\winfs\%username%$\profile\chromedata" COPY /Y "\\winfs\%username%$\profile\chromedata\Login Data" "C:\users\%username%\AppData\Local\Google\Chrome\User Data\Default"
IF EXIST "\\winfs\%username%$\profile\chromedata" COPY /Y "\\winfs\%username%$\profile\chromedata\Preferences" "C:\users\%username%\AppData\Local\Google\Chrome\User Data\Default"


Enjoy Chrome’ing!