UPDATE: Please see my post about not redirecting the Application Data Folder.
If you’re anything like me, you probably have a few computers in your home. At least a laptop that usually hangs out on the coffee table, and a desktop that is planted firmly in the office. If you’re anything like me, you also get very annoyed when you go for a file that you were working with on the other computer.
While most people would be completely satisfied with simply sharing the user profile from both computers via windows file sharing, this seemed completely unrefined and without any IT finesse at all – it would not do.
I set out to find a solution that would:
- Store all of my documents (including iTunes and photos) in one location, accessible from any computer in the house simultaneously.
- Make all of my documents (including iTunes and photos) available on the laptop if it were removed from the house.
- Have the same convenience for all users in the home.
- Back these documents up.
Initially I thought to myself: Oh, this is easy!
1. Set up a domain controller & active directory
a. Set up DHCP on this server
b. Set up DNS on this server
2. Set up roaming profiles
3. Fix roaming profiles with folder redirection
Halfway through that process I realized: You moron, you’re replacing your very nice network router (a Cradlepoint MBR-1000) and replacing it with a software based version of it, just so you can tell two computers to take their profile information from a network share.
So, realizing I was setting myself up to have to administer my own home network (as well as the one at work), I backtracked and did some research on folder redirection without a domain controller, active directory, or roaming profiles.
Turns out it’s quite simple. I’ll get to the ‘how’ in a second, but first some networking basics. I started out with three boxes:
- 1.8Ghz AMD
- 1G Ram
- 2x 150G Hard Drives
- Windows XP Pro
- 1.83Ghz Intel Laptop
- 1G Ram
- 150GB HD
- Windows XP Pro
- 2.6Ghz Intel
- 2G Ram
- 300 GB HD
- Windows XP Pro
I wanted Dot to be the desktop, as it would make for snappy response time when Andy was using it for school work, and plenty of power for some StarCraft for me. This left Yacko available to do some tasks, and be available for use at a later date; for now he would simply serve as the repository, perform backups, and be the centralized point of connection for external media…
I chose to give all of my computers static DHCP entries in my router (not all routers do this, but if you have my #1 suggested router – Linksys’ WRT54G, then you can use DD-WRT, an open source firmware replacement, to accomplish this.) Basically, the router knows your network adapters MAC address (fingerprint), and always gives it the same IP address every time it asks for a new one. However, when you connect your computer to another network, it will get whatever that network wants to give it (the perfect solution over manual IP assignment on a laptop that you want to be able to take to Starbucks.)
If you can set this up, you can then edit the hosts files so that all your computers know where each other are. (DO NOT edit your hosts file if you can’t ensure your computers will have static IP addresses on your network.)
Edit your hosts file (c:\windows\system32\drivers\etc\hosts) with a text editor and specify the IP address and the computer name next to each other. Sidenote: I also stated in my hosts files on each machine their own name pointed to (which means ‘this computer’), I haven’t seen any adverse effects from this, but am open to comments.
I highly suggest you name the computers on your network something meaningful – it will help in the long run. A lot of IT guys choose ‘sets’ of things, or personify their computers with synonyms (e.g. – a mail server could be called ‘pigeon’, a DHCP server ‘reception’) (for those of you who can’t tell, mine are the characters of the Animaniacs, with plenty of other character names from the series to choose from when I add additional equipment.)
Oh, and put all your computers in the same workgroup!
Change computer name: Right-Click ‘My Computer’, select ‘Properties’, select ‘Computer Name’ tab, press ‘Change’ button, enter new computer name and workgroup, select OK, reboot.
Once all of my computers were acquainted, I turned off ‘simple file sharing’ – a sad excuse for making sharing files easier perpetrated by Microsoft on innocent computer users everywhere.
Turn off simple file sharing: Open ‘My Computer’, go to ‘Tools’ menu, go to ‘Folder Options’, select ‘View’ tab, scroll to bottom of ‘Advanced Settings’ box, uncheck ‘Use Simple File Sharing’, select ‘OK’
I then added the two users I intended to have on each of the machines, and assigned passwords. Network sharing doesn’t work properly for accounts that don’t have passwords, so don’t try to keep a blank password; it’s for your own good… set the passwords not to expire unless you want things to stop working inexplicably in 90 days.
Add new users: right click ‘My Computer’, select ‘Manage’, expand ‘Users and Groups’, right click ‘Users’, select ‘Add new user’, fill out new user info
Then I set up a share on Yacko called ‘USER_PROFILES’. It’s kind of a misnomer, because it doesn’t contain the profiles, just the user folders.
Create share from existing folder: Right click folder, select ‘Sharing and Security’, toggle ‘Share this folder’, assign name, select ‘Permissions’ and add appropriate groups or users, select OK (2x)
I started redirecting folders on Yacko:
Note: the following section speaks of editing your registry; no specific instructions on how to edit your registry will be given in this posting; see the link at the bottom of this posting referring to the MS KnowledgeBase to acquaint yourself with the windows registry. This blog posting is given ‘as-is’ with no warranty, guarantee, or acceptance of liability for you screwing up your computer.
In the registry, navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
Note that since we’re in ‘HKEY_CURRENT_USER’ this is a per user setting, meaning it must be set for each user, on each machine. There are several guides out there that address editing similar keys under ‘HKEY_LOCAL_MACHINE’, which will edit the shared documents folders – this is not what I wanted to do. (Shared docs folders are where you place things you want to appear in all user’s folders – like the 30 icons HP puts on your desktop when they install a printer driver.)
I chose to edit the AppData, Desktop, Favorites, My Pictures, & Personal keys (I know that ‘My Pictures’ is redundant as a subfolder of ‘Personal’, but I chose to do it anyways.) I replaced ‘%USERPROFILE%’ (a system variable that points to ‘c:\documents and settings\%USERNAME%’ – you guess what %username% means) with ‘\\yacko\USER_PROFILES\%USERNAME%’.
After doing that for each key, and once you log out and log back in, if you had any documents on the desktop or in any of the other folders, they are now missing. Navigate to their local location (‘C:\Documents and Settings\Desktop’, etc.) and copy them to the back to the desktop/my documents/favorites folders as needed. (I backed up all my documents, etc prior to beginning the process so I copied them from the external I had them on.)
Repeat this process in each user account on each computer that you intend to utilize the document repository. All in all, I had to do it six times – twice on three computers.
The result will be that upon creating a new document in your My Documents folder, it is immediately available on the other computer in the same location. The same is true of edits, deletions, etc. Video Demo:

At this point, I needed to disable ‘Fast User Switching’ so that windows would let me utilize the ‘Offline Files’ feature – a mechanism that creates local copies of network files that you select so that you can access them if the network copy is unavailable. Once you disable fast user switching you will be unable to have two users logged in at one time, but this wasn’t going to be a problem.
Disable fast user switching: Start -> Control Panel -> User accounts -> Change the way users log on or off -> uncheck ‘Use Fast User Switching’
Once you log out and log back in, Windows automatically toggles redirected user folders for offline availability. You will notice a small overlay on your desktop/my documents icons – a small set of arrows pointing around each other – this indicates that they are synchronized in the offline file storage.
I then configured my backup software on Yacko to back up the ‘USER_PROFILES’ directory every morning at 4AM, keeping 5 revisions and deletions for 7 days.
Several jump drives I have contain fairly valuable information, so I wanted to include them in a backup. Backing up removable media can be kind of annoying, in that every time you plug it in, it stands the chance of getting assigned a different drive letter. Solve this by inserting your media, then going to computer management (right click ‘My Computer’, click ‘Manage’) and then going to ‘Disk Management’. Right click your removable media and select ‘Change Drive Letter’ – assign the media a drive letter that doesn’t typically get used for anything else.
Going forward, that computer will always mount that media as that drive letter. (My primary jump drive always mounts as O for instance.)
Add a new backup set and configure it for manual use; then it’s a simple as inserting the media, and toggling that backup set. Done once a week, you can rest assured if you loose your jump drive.
Then there was iTunes to worry about.
For most people, their iTunes is going to be small enough to keep it in their ‘My Music’ folder. If that applies to you, then simply make sure your iTunes music library is located in the appropriate place (My Music\iTunes\iTunes Music Library) and fire up iTunes – it should see the XML file and viola! Your library should pop up as normal.
However, if your library is as large as mine is, the only place for it is on an external hard drive. The following solution makes sure the library doesn’t replicate to each computer via offline files, and also lets you pull the hard drive and leave the house with it.
With my 500GB Western Digital Passport plugged into Yacko, I assigned it the drive letter of T: (ya know, for ‘tunes.), then shared the ‘iTunes’ folder within it as ‘iTunes’.
One the client computers, I then mapped a network drive to that share. After double-clicking the iTunes icon, hold shift and you’ll be prompted to select your iTunes XML file (a WONDERFUL trick that isn’t very well known – this is useful for people who just want to keep their entire iTunes library (including the XML database) on an external hard drive. Navigate to the mapped network drive and again, viola! Your library should pop up as normal.
I’m listening to a My Chemical Romance album being played off Yacko (located in the office) while sitting in the living room typing this on Wacko.
Of course, the standard iTunes music account authorizations apply!
The only issue I’ve run into thus far has been with Firefox. It stores user profiles in the Application Data folder of user accounts, so when you try to fire up the browser on multiple machines, it sees the default profile in use on the other machine and gives the prompt ‘Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system.” The solution is fairly simple: Create a new shortcut to “”C:\Program Files\Mozilla Firefox\firefox.exe” –profilemanager” (sans the outside quotes) and use it to launch the profile manager. Create a new profile for each machine.
If anyone reading this has any input on redirection the Application Data folder (Pros/Cons, advice), I’m all ears.
Google Chrome seems to be unaffected by any of this, as it installs itself in the ‘Local Settings\Application Data’ folder (which is why if you’ve ever tried to launch Chrome on a second user account after installing it on a first, it won’t launch – apparently you have to run in the installer in each new account.)
Other thoughts/notes:
There are obvious speed issues and a need for you to have stable networking when approaching a project like this (even with the backup of having offline files.) – I have a very stable router and a dedicated bridge to my entertainment center (stand by for a posting about not wasting $50 on a TiVo wireless adapter.) My wireless network is forced to maintain at least a ‘G’ level – it will soon be upgraded to only ‘N’. Just keep in mind that if you’re transferring large files around, it can take some time – this effectively turns your desktop, my documents, etc. into a mounted network share.
A not about wireless network speeds for those that don’t know: It doesn’t matter if you buy the nicest $150 router around that boasts all the N-capability in the world; it will always function at the lowest common denominator on the network (e.g. – if you have a ‘B’ class device, your ‘N’ adapter is only serving ‘G’. I have an N router, buy my bridge is a G class device, but I force both devices to function at a G or higher rate, thus eliminating the chance of my neighbor with a ‘B’ device from pinging my equipment and bring my speed down. (not that he’d get it, because we’ve all secured our wireless equipment, haven’t we?
Obviously, the standard warnings and disclaimers apply to editing your system registry – if this is the first time you’ve read about it, it’s not for you. This MS KnowledgeBase article goes into more depth: http://support.microsoft.com/kb/256986

4 comments so far

Add Your Comment
  1. That was the longest post….EVER! And I sopped reading after the 3rd paragraph…sorry! :)

  2. [...] a previous post, I demonstrated how to use folder redirection and offline files to automatically sync documents and [...]

  3. [...] I had a post on here a while back that detailed how to take a centralized network storage location and redirecting the [...]

  4. Thanks for this. I actually intend to use it for a VirtualBox Windows XP VM that I plan on running Picasa on so I don’t have to care about backing up an otherwise throw away VM. (I run GNU/Linux systems, but prefer Google Picasa.)