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!


7 thoughts on “Google Chrome, Lab Computers, Roaming Profiles

  1. Nice writeup. I did the same thing, except I copied most of the chrome profile, except the cache.

    COPY /Y “C:\users\%username%\AppData\Local\Google\Chrome\User Data\Default\” “\\server\share$\user\chromedata\default”
    COPY /Y “C:\users\%username%\AppData\Local\Google\Chrome\User Data\” “\\server\share$\user\chromedata”

  2. I was able to accomplish this slightly differently. We have users logging onto a 2008 Remote Desktop. They have both redirected folders (ie appdata, documents, etc.) as well as their RD Roaming User Profile (which is removed from the RD server at logoff).

    Since Chrome now supports a registry key of “HKLU\Software\Policies\Google\Chrome\” with an entry of UserDataDir=whatever we used a GPO Registry Preference to set this key.

    The USERDATA entry is set to save data at %USERPROFILE%\AppData\Roaming\Google\Chrome (so essentially C:\Users\jdoe\AppData\Roaming\Google\Chrome).

    Since this folder is in the “Roaming” subfolder on the RD Server, it is automatically stored with their Roaming User Profile at logoff/on (on the fileserver in X:\RD_PROFILES$\jdoe.V2\AppData\Roaming\Google\Chrome).

    We now have sucess in launching and using Chrome with Roaming Profiles/Redirected Data HOWEVER, it still didn’t address the problem of the massive cache sizes syncing back and forth.

    Much to our delight, we located another registry key that could be used (in Chrome v13+) — “HKLU\Software\Policies\Google\Chrome\” with an entry of DiskCacheDir=whatever.

    We were able to set this to be %APPDATA%\Google\Chrome\Default and bingo — cache data is stored on the in the roaming appdata folder on the fileserver.

    Bottom line, using GPO to create the 2 registry keys after installing Chrome v13 with Google Pack and everything is working without the need for scripts, etc. For additional Chrome Policies see

  3. Adam sounds like he has a good solution to this and I might give it a go. I like to avoid using operational scripts where possible though, they are a nightmare for personnel churn and knowledge continuity.

    I am tempted though just to completely remove appdata\local from my citrix user profile manager policy (the only reason it remains is for this) and users will just have to lose their settings. If users are unhappy that they are losing personalisation from chrome, they can contact Google and get them to write their applications properly. I have just had enough of the cache bloating the profile so am past caring.

  4. Just a suggestion to use %LOCALAPPDATA% instead of C:\users\%username%\AppData\Local as sometime duplicate profiles can be created with the form \users\username.DOMAIN\

  5. Fantastic blog! Do you have any helpful hints for aspiring writers?
    I’m hoping to start my own site soon but I’m
    a little lost on everything. Would you recommend starting with a
    free platform like WordPress or go for a paid option? There
    are so many options out there that I’m completely overwhelmed ..

    Any suggestions? Thanks a lot!

  6. Hello there I am so happy I found your weblog, I really found you by mistake, while I was browsing on Bing
    for something else, Regardless I am here now and would just like to say thank
    you for a tremendous post and a all round thrilling blog (I also
    love the theme/design), I don’t have time to browse it all at the minute but I have
    saved it and also included your RSS feeds, so when I have time I will be
    back to read much more, Please do keep up the great job.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s