One of the great things about digital formats is being able to easily group and find all of your music and video. iTunes combined with Remote.app on iOS devices (iPhone/iPad/iPod Touch) works really well for selecting and playing music around the home or office. Music playback doesn’t need much processing power, so any old PC or laptop can be repurposed for the task, or it can be added to a pre-existing server.
Add a couple of AirPort Express base stations for AirTunes and you can control both music selection and multiple sets of speakers from the iPhone. AirPorts can just be setup to join an existing network, rather than creating their own, to provide an additional set of speakers to send music to.
The main problem with iTunes is it’s not really designed to run as a server application. For example you must log in and run the app after every restart, a necessity for Windows Update. Admittedly you could set the computer in question to auto-login and add iTunes to the startup group, nor is it even practical if the computer in question is an office server as well.
It is, however, possible to successfully run iTunes as a service. The trick is to use a service wrapper utility called SrvAny from the Windows 2003 Resource Kit. This runs when the computer starts up and starts iTunes as a service in the background. We set up a separate user account for iTunes and SrvAny to run under, and set permissions on this account to lock it down so it could only access the music files. To set up iTunes as a Service, copy ‘srvany.exe’ to c:\windows\system32, add the following to the registry (customising for your system as necessary), and then in the Service to login as ‘iTunesServer’:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\itunesservice] "Type"=dword:00000010 "Start"=dword:00000002 "ErrorControl"=dword:00000001 "ImagePath"="C:\\Windows\\System32\\Srvany.exe" "DisplayName"="iTunes (Media Server)" "ObjectName"="NT Authority\\LocalService" [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\itunesservice\Parameters] "Application"="C:\\Program Files\\iTunes\\iTunes.exe" [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\itunesservice\Enum] "0"="Root\\LEGACY_ITUNESSERVICE\\0000" "Count"=dword:00000001 "NextInstance"=dword:00000001
This has been tested on a Windows 2008 Server here, but should work fine on any version of Windows, desktop or server. If you need to access the iTunes UI for any reason, stop the service and run the app interactively from the ‘iTunesServer’ user account.
The other minor annoyance of iTunes is the speaker list that comes up in Remote.app. You can specify a name for AirTunes speakers, but the ones attached the computer iTunes is running on are always called ‘My Computer’. Fortunately this can be customised too by editing the iTunes localisation file. Locate the file below (selecting the correct .lproj folder for your language):
Windows: c:\Program Files\iTunes\iTunes.Resources\en.lproj\Localizable.strings MacOS: /Applications/iTunes.app/Contents/Resources/English.lproj/Localizable.strings
And search for string ‘163.035’ (without quotes)—that is the name for the built-in speakers. Change it to whatever you want. In iTunes 10 and newer the localisation files are commented, so it’s easier to find and edit these text strings.
Hi, thank you for this customising tip for windows. I have an iMac with Mac OS X. Please can you help me to run iTunes as service at this machine as well? I don’t like to log in and start up iTunes, if i like listen music on my Apple TV 2G.
Thank you for help.
zar
Unfortunately I’m not sure how to do this on a Mac. The speaker naming is easy, as both platforms use the same resources file. Something for Google I guess…
Hey Matt
We are just launching a little app that combines running iTunes as a device with the ability to scan for new media in defined Watched Folders, auto update metadata and detect dead links.
You can download a trial at
http://www.bizmodeller.com/iHomeServer_for_iTunes.aspx
As this is a new product, would be happy to provide you a free license key in return for some testing feedback? If you are interested then please email me.
Thanks
Ed
Sounds like an interesting product.
Unfortunately we’ve given up on iTunes, not because of problems with the app itself, but our Airport Express kept falling off the network, so the remote speakers almost always didn’t work. That combined with the rubbish drivers for the sound card in the server (M-Audio), meant we had to run iTunes interactively anyway.
Currently we’re using TwonkyMedia Server, mainly for video, with a PS3 as the end point and it’s working great.
M.