Using symbolic links in Vista to fix iTunes library

Today I had a user call about a problem with iTunes not finding any music after migrating to Vista.  The problem was that they'd not kept all their music in the "iTunes Music" directory and it was spread out all over the "My Documents" directory on the old machine, and the username was also different so the default link that Vista creates (from "Documents and Settings" to "Users") wouldn't work. So instead of recreating the iTunes library from scratch or relocating all the files I remembered that Vista now supports symbolic links, so all that was needed was to create a directory in users with the old username then use MKLINK to create a link from the old location (C:\Documents and Settings\oldusername\My Documents) to the new one (C:\Users\newusername\Documents) and all was well.  

Using MKLINK is fairly easy, but you need to run the command prompt as administrator in order to do it.  To create a symbolic link to a directory you use the /D switch like so :

mklink /d "c:\Documents and Settings\bob\my documents" "c:\users\chris\Documents" 

Which will link them so when you try to access the old location, it will look in the new path.   Also you can remove a link by removing the directory, if you're unsure then DIR will show you if the directory is a real directory or a symbolic link.