How-to: iTunes on USB drive (PC only)

GO TO ADMIN PANEL > ADD-ONS AND INSTALL VERTIFORO SIDEBAR TO SEE FORUMS AND SIDEBAR

Zeuser

Software Engineer
Joined
Sep 28, 2005
Messages
21
Points
0
Age
52
In this thread I will detail how I got iTunes to work on my 120GB USB drive.

Purpose
I'm sick and tired of iTunes with its library being unique to one computer. I wanted a way to carry iTunes and its library from one PC to another.

The only thing I wanted was a USB drive, iPod USB sync cable and the iPod itself.

The USB drive
The drive is a 120GB Samsung Laptop drive. Usually used as a replacement for the internal HDD on various laptops.

I then purchased a USB enclosure for 3.5" drives. It's a simple procedure. Plug the included USB adapter into the drive's connector, slip the whole assembly into the aluminium case and screw the two small screws to hold it all together.

The drive enclosure comes with a USB cable that has one mini device connector on one end and two standard USB connectors on the other. I think it needs the 2 connectors because it draws more amps than one port can give.

Anyway, you need to use up 2 USB ports on the computer. To avoid failures I usually plug in the computer side first (both connectors) and then plug in the device end into the drive enclosure.

Next is the obvious Windows stuff. You partition the drive, format etc.

Prepping for iTunes
I created an Autorun.inf file in the root folder with the following:

Code:
[autorun]
icon=\mobile.ico
label=120GB iTunes drive
open=iTunes_mobile.bat
As you've probably noticed, I use a custom icon so its easy to spot in Windows explorer. I also named the drive (label) so I can easily spot it. The open command is a batch file that will allow iTunes to run automatically on Windows XP SP2. Note: Only service pack 2 has the auto-run from USB feature.

Here goes with the iTunes_Mobile.bat file:

Code:
set APPDATA=%~dp0Application Data
if not exist "%~dp0Application Data" mkdir "%~dp0Application Data

set HOMEPATH=%~dp0Documents and Settings
if not exist "%~dp0Documents and Settings" mkdir "%~dp0Documents and Settings

set USERPROFILE=%~dp0
set ALLUSERSPROFILE=%~dp0
echo starting iTunes
start \iTunes_programs\iTunes.exe
This will create the application data and document and settings folders locally on the USB drive and then starts iTunes. This is what allows iTunes to be "mobile".

Installing iTunes
Just install iTunes 7 like you normally would on the computer. Then create a "iTunes_Programs" folder on the USB drive and drag-drop everything from "c:/Program files/iTunes" into the new folder.

I also added an "iTunes_Installer" folder where I keep a copy of the iTunes setup program. This is needed as a first step when you move from one PC to another.

Once iTunes is installed on your USB drive. Run it via the iTunes_mobile.bat batch file. It'll come up with a blank library. don't worry, this is normal! Then shut it down. iTunes has now created the necessary folders on the USB drive.

Now you just need to drag and drop the stuff from /My Documents/My Music/iTunes music on your computer's hard drive into the appropriate folder on the USB drive. This may take a long time if you've got a big library like I do.

Once finished, run iTunes_Mobile.bat again and you'll notice that everything is in it's place. If not, you made a mistake. Figure it out.

Using the USB drive on a new computer
The very first thing you need to do is install iTunes on the new machine. So plug in the USB drive but don't auto-run. Browse the USB drive to the iTunes_Installer folder and run the iTunesSteup.exe program. This will install iTunes with a blank library on the new computer.

Then run iTunes and shut it down. Now you're ready to run your mobile library. Just run the iTunes_mobile.bat file from the root of your USB drive and voila, you're up and running.

You can even plug in your iPod USB sync cable and dock your iPod to sync files with the USB drive on the new machine. I do that all the time since I sync hourly podcasts.

120GB drive with 60GB iPod?
Yes, my iTunes library currently has 106GB worth of stuff (music and videos). I simply uncheck the stuff I don't need until I hit the 55GB mark and then I can sync the iPod. You need to turn on the "only sync checked items" in the devices/summary window of iTunes 7.

No guarantee but it does work
I can't gurantee it works as well for you as it does for me. But its been working for me since last December when I was running iTunes 6 and only had an 80GB drive. I recently migrated to a 120GB drive and iTunes 7 and it still works like a charm.

I have only one library for iTunes, and its on my mobile drive. I use it on 3 seperate computers:

1 - My media PC at home
2 - My laptop
3 - My office PC during the day

I love this thing! iTunes should've been designed like this to start with! Incidently, I'm a fan of thumbdrive apps. I use a 2GB thumbdrive with portable firefox, ble thunderbird, portable sunbird, portable openoffice etc. See http://www.portableapps.com for more.

PS: I assume no responsability if you mess up. It's not a simple setup but any well versed XP power user whouldn't have any trouble with this.
 

Ben B

New member
Joined
Aug 9, 2006
Messages
37
Points
0
I set mine up like this recently. I was really chuffed with myself until I just plugged it back in after painstakingly spending a week on holiday and it now says every tune on it can't be found. Is this because every time a USB drive connects it gets a new drive letter perhaps??

So, I realised that this time I had a USB key drive plugged in too, so I removed it and reconnected the 'mobile itunes' usb lead as the only other drive, it's drive letter returned to 'E:' and now PHEW! the tunes are all there again!

So there's a tip!
 
Last edited:

S2_Mac

New member
Joined
Oct 24, 2006
Messages
4,878
Points
0
Location
About 3 feet in front of the monitor
LOL! A 3.5" drive in a laptop? Bet that needs a big lap ;-)

Nice piece of work! Too bad QuickTime needs to load at startup, or you could jigger iTunes to rip, too.

BTW -- if you're tired of checking/unchecking tracks, you can build smart playlists that top out at a specified capacity....
 

Larsmark

New member
Joined
Jun 16, 2008
Messages
1
Points
0
why install Itunes??

Hello

I don't have enough spare time at the moment to see the following through it does how ever sound great in theory,

the manual installation of Itunes on the PC could be eliminated how you ask??

2 ways
1. some quick googling revealled the instructions for a unattended install of Itunes, you Qbatch is run,

2. would be the perferable way
answer this question, what does the installer do to the computer???? ,,

Answer is,,,,
the installer creates registry entries and places certain files and various directories IE windows\system32\*.dll

if someone was to monitor the installation of Itunes/quicktime with a program like "regmon" and collect a list of what registry keys are created and what files are placed in the Windows Directory. then when the portable app is first opened it transfers the required regkeys and files without a fullblown install,

as neither Itunes or Quicktime NEEDS to load with Windows this would create a truly powerfully portable music store.

Also for anybody like Ben B who has extra USB devices that may interfere
I would suggest you do the following

edit iTunes_Mobile.bat
replace
<code>
echo starting iTunes
start \iTunes_programs\iTunes.exe
</code>

with
<code>
echo starting iTunes
subst M: %~dp0iTunes_programs
start /w iTunes.exe
subst M: /D
exit
</code>

this extra code creates a new drive entry in this case M drive mapped to the Itunes Programs Directory on your USB drive please Change M to another available drive letter

Covent: this will leave a Dosbox open while Itunes is in use and closes when you close Itunes after removing referance to M: this window could be hiden with the help of a App called cmdow the other varables that hae been changed sgould probly be reset here also
 
Last edited:

imux

New member
Joined
May 29, 2009
Messages
1
Points
0
hi i have a sandisk u3 disk.. wud u know how i can install itunes 8.1 on it? any help wud be appreciated.. thanks
 

pd03

New member
Joined
May 9, 2012
Messages
1
Points
0
itune on flash drive

I tried to follow the method you described ditto.

When I run the batch file, it created application data folder, but did not create documents and settings folder.

It also opened itune library but it was from pc and not from the flash drive

When i disconnected my USB drive and reconnected, it did not autorun.

I checked and rechecked every thing, nothing seems to be wrong.

Why I am not able to get the desired results

I am using Windows Vista Ultimate 32 bit

Request for your kind help

Thanks

Paras
 
Top