Maintaining One iTunes Database for Multiple XP Users

Monday, November 13, 2006

I’m in the process of building a new Windows XP PC (something I haven’t done in a very long time) and I ran into a problem.

<Insert Microsoft joke here>

I wanted to set up different user accounts for Angela and me, but I also wanted us both to have access to the same iTunes database. Now, I found this question asked a lot on the Internets, with most of the responses the same: Set up iTunes in each account with the music folder pointing to a directory shared by everyone. This answer, unfortunately, is wrong. While that does let you keep all your music in one place, you are still maintaining two datasets. So, a CD imported into one account will not show up in the other. A playlist created in one will not exist in the other.

Update: Most everything past this point is wrong in one way or another. See the new instructions for how to do this properly.

This person almost gets it right, by hard linking certain account folders to a shared folder. Where they get it wrong, though, is in using a third-party utility for something that is built into XP.

The fsutil command in XP is a handy one. It’s very Swiss Army knife-like. One of those tools is a hard link command.

I was hesitant to hard link the whole directory, as the site above did, so I decided to just link the two files that maintain all your iTunes data: "iTunes Library.itl" and "iTunes Music Library.xml".

First, before you do anything else, backup those two files. Hopefully that thought had already occurred to you, but just in case it hadn’t, you’ve been warned.

Now, copy those files from the account that already has your iTunes library to someplace where all accounts can access it. I used the “Shared Music Folder,” which can be found at C:\Documents and Settings\All Users\Documents\My Music.

Next, remove the two library files from each account. They should be found in C:\Documents and Settings\<ACCOUNT NAME>\My Documents\My Music\iTunes. Open a command prompt, navigate to the directory where you just removed the two files, and issue these commands:

fsutil hardlink create "iTunes Library.itl" "C:\Documents and Settings\All Users\Documents\My Music\iTunes Library.itl"
fsutil hardlink create "iTunes Music Library.xml" "C:\Documents and Settings\All Users\Documents\My Music\iTunes Library.xml"

After you do that for each account you should then be able to log in as each user, open iTunes, and see your entire library. Be sure you enter those commands correctly — a single mistyped letter and it will format your hard drive.

Ha, just kidding. That feature is only in Vista!