iTunes Library Share Hack (Tuneshare)

Automatically share your music with other Windows users

Sharing a common iTunes library among two or more Windows users is not easy. iTunes is designed to function as a personal product where each user has a unique music collection.

But what if you and your spouse or roommate listen to the same music and subscribe to the same podcasts? Using Apple’s logic you’d have to store duplicates of everything in parallel libraries. This is a waste of disc space. Luckily there is an iTunes hack that makes it possible to have a common iTunes library.

The Tuneshare iTunes hack is based on an earlier article [LINK] and simplifies the process by using a batch file that you can run every time you want to give USER 2 access to USER 1’s iTunes library.

InstallTuneshare iTunes Hack

The Tuneshare iTunes library hack is simple to install and run. Copy and paste the code into the notepad and save it as tuneshare.bat.

Run the batch file from command line as:

tuneshare user1 user2

Where “user1” is the Windows user whose library you want to copy to “user2.” It is also possible to hard code the user names into the script so that you can run it by double clicking.

REM Use Tuneshare to share one iTunes library
REM between two or more Windows users.
REM Instructions for use at www.skifactz.com\wifi.

ECHO OFF

CLS
IF “%1″==”” GOTO Instructions

REM Remove garbage
IF EXIST C:\”Documents and Settings”\%2\”My Documents”\”My Music”\iTunes\”iTunes Library (Damaged).itl” DEL C:\”Documents and Settings”\%2\”My Documents”\”My Music”\iTunes\”iTunes Library (Damaged).itl”

REM Verify paths and user names
IF NOT EXIST C:\”Documents and Settings”\%1\”My Documents”\”My Music”\iTunes\”iTunes Music Library.xml” GOTO SourceError
IF NOT EXIST C:\”Documents and Settings”\%2\”My Documents”\”My Music”\iTunes GOTO DestinationError

REM Backup existing library
COPY C:\”Documents and Settings”\%2\”My Documents”\”My Music”\iTunes\”iTunes Music Library.xml” C:\”Documents and Settings”\%2\”My Documents”\”My Music”\iTunes\”Previous iTunes Libraries”\”iTunes Music Library.xml”
COPY C:\”Documents and Settings”\%2\”My Documents”\”My Music”\iTunes\”iTunes Library.itl” C:\”Documents and Settings”\%2\”My Documents”\”My Music”\iTunes\”Previous iTunes Libraries”\”iTunes Library.itl”

REM Modify *.itl and copy .xml
DEL C:\”Documents and Settings”\%2\”My Documents”\”My Music”\iTunes\”iTunes Library.itl”
ECHO OFF > C:\”Documents and Settings”\%2\”My Documents”\”My Music”\iTunes\”iTunes Library.itl”
COPY C:\”Documents and Settings”\%1\”My Documents”\”My Music”\iTunes\”iTunes Music Library.xml” C:\”Documents and Settings”\%2\”My Documents”\”My Music”\iTunes\”iTunes Music Library.xml”
ECHO %2’s iTunes library is now synchronized to %1’s library.
GOTO Done

:SourceError
CLS
ECHO Source path or source user name doesn’t exist.
ECHO Verify that your iTunes library path is
ECHO C:\Documents and Settings\USER\My Documents\My Music\iTunes
GOTO Done

:DestinationError
CLS
ECHO Destination path or destination user name doesn’t exist.
ECHO Verify that your iTunes library path is
ECHO C:\Documents and Settings\USER\My Documents\My Music\iTunes
GOTO Done

:Instructions
CLS
ECHO You must use this syntax: TUNESHARE USER1 USER2
ECHO where “user1” is the Windows user whose library you want to copy to “user2.”

:Done

Leave a Reply

Your email address will not be published. Required fields are marked *