Fixing Mysterious Windows 7 Roaming Profile Problems
This infuriated me for a good long while.
I run a Samba server (under Debian) that acts as the PDC (primary domain controller) for my Windows network. I've been doing this for more than 10 years now, so I know the drill: there's always a certain amount of pain when upgrading either Samba or Windows. However, once I've get things working after an upgrade, they generally stay working.
My most recent upgrade (to Windows 7 on a new quad-core 64-bit box) was more difficult than most, but I did eventually beat Samba and Windows into submission. I fully expected things would be OK until the next Debian release.
Alas, that was not to be. Instead, my Windows machine suddenly started failing on logout, with a complaint that the roaming profile was not completely synchronized. Some updates would be persisted to the PDC, but others wouldn't be. The most obvious symptom was that files I deleted from my desktop reappeared the next day.
After going down the rabbit hole and trying a lot of different things (thinking that I had broken Samba), I eventually realized that the Windows event viewer (Programs > Administrative Tools > Event Viewer) might give me some feedback. In fact, it did. Under Event Viewer (Local) > Windows Logs > Application, I started seeing warnings like this:
Your roaming profile is not synchronized correctly with the server. Windows will load your previously-saved local profile instead. See the previous events for details.
Aha! A bit later in the logs, I found this:
Windows cannot copy file \\daystrom$NOCSC$\pronovic\profile.V2\AppData\Roaming\Macromedia\Flash Player\#SharedObjects\LVMDPEPY\www.springboardplatform.com\[[IMPORT]]\cdn.springboard.gorillanation.com\mediaplayer\springboard\plugins\flowplayer.advertising.swf\springboard_advertising_counter.sol to location C:\Users\pronovic\AppData\Roaming\Macromedia\Flash Player\#SharedObjects\LVMDPEPY\www.springboardplatform.com\[[IMPORT]]\cdn.springboard.gorillanation.com\mediaplayer\springboard\plugins\flowplayer.advertising.swf\springboard_advertising_counter.sol. This error may be caused by network problems or insufficient security rights. DETAIL - The filename or extension is too long.
After a little digging, I found this page: http://www.computer-howto.com/2010/08/roaming-profile-error-fix/ This helped me understand that I was on the right path. I tried using the Flash tool suggested on that page to clear my cache, but it didn't completely clear the directory.
In the end, I removed the #SharedObjects directory by hand on the server-side roaming profile (after logging off the Windows machine). It took a few login attempts, but eventually everything got synced up again and things are working now. Flash appears to still work properly, and the directory I deleted got re-created at some point. So, I think I'll be OK.
I guess if this starts happening again, I'll have no choice but to remove the directory again. I suspect there's a way to remove this directory from the shared roaming profile (exclude it somehow), but I haven't figured that out yet.