Windows 7 Profile Synchronization Problem – ProfileList

So, I was testing Windows 7 roaming profiles and ran into the following error which wouldn’t shake off: “You have been logged on with a temporary profile”. Here’s what happened:

I wanted to see if profiles were properly downloading from the server, so on my test workstation I deleted the test user’s profile from C:\Users. When I tried logging on as the test user, Windows 7 gave me the error message. After poking around on the web, I learned that Windows 7 actually keeps track of all the profile folders in this registry key: HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProfileList. After deleting the key corresponding to C:\Users\TestUser, subsequent logins worked perfectly. You’d think Windows 7 could handle this on it’s own. At least the fix is easy.

Advertisements

Windows 7, Folder Redirection, and Redundant Folders

Another ongoing Windows 7 migration issue: I deployed a new test workstation, logged in with a brand new test user, clicked the username in the start menu, and explorer showed me this:

  • Contacts (redirected)
  • Desktop (local)
  • My Desktop (redirected)
  • Documents (local)
  • My Documents (redirected)
  • Downloads (local)
  • Favorites (local)
  • Links (local)
  • Music (local)
  • My Music (redirected)
  • My Pictures (redirected)
  • My Videos (redirected)
  • Pictures (local)
  • Saved Games (redirected)
  • Searches (redirected)
  • Videos
  • <username>$ (redirected; the user’s share)

Redundant much? Turns out that about haf of these folders were created on first login by the “Default User” profile in C:\Users. I removed all the folders from “Default User” and the next test user was clean. I hope that saves someone some time :).

Windows Sidebar, Gadgets, and Roaming Profiles

So, Roaming Profiles with Windows 7 is my current project at OSU Chemistry. One thing I noticed early on is that Gadgets don’t roam, since their data is stored in %localappdata% (kinda like Google Chrome). However, it’s pretty easy to save and restore the gadgets and gadget settings with login and logoff scripts.

The Scripts

Save-Gadgets


@ECHO OFF
REM Make sure Windows Sidebar is installed.
IF NOT EXIST "C:\Users" GOTO END
IF NOT EXIST "C:\Program Files\Windows Sidebar\sidebar.exe" GOTO END

REM Save Gadgets Data
IF NOT EXIST "\\winfs\%username%$\profile\gadgets" MKDIR "\\winfs\%username%$\profile\gadgets"
IF EXIST "C:\Users\%username%\appdata\local\microsoft\windows sidebar" COPY /Y "C:\Users\%username%\appdata\local\microsoft\windows sidebar\*" \\winfs\%username%$\profile\gadgets

:END

Restore-Gadgets


@ECHO OFF
REM Make sure Windows Sidebar is installed.
IF NOT EXIST "C:\Users" GOTO END
IF NOT EXIST "C:\Program Files\Windows Sidebar\sidebar.exe" GOTO END

REM Restore Gadgets Data
taskkill /f /im sidebar.exe
IF NOT EXIST "C:\Users\%username%\appdata\local\microsoft\windows sidebar" MKDIR "C:\Users\%username%\appdata\local\microsoft\windows sidebar"
IF EXIST "\\winfs\%username%$\profile\gadgets" COPY /Y "\\winfs\%username%$\profile\gadgets\*" "C:\Users\%username%\appdata\local\microsoft\windows sidebar"

REM start sidebar
start sidebar

:END

Enjoy your gadget’ing!

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

Save-ChromeData


REM Save-ChromeData.cmd
@ECHO OFF
IF NOT EXIST "C:\Users" GOTO END

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

:END

Restore-ChromeData


REM Restore-ChromeData.cmd
@ECHO OFF
IF NOT EXIST "C:\users" GOTO END

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"

:END

Enjoy Chrome’ing!