Wednesday 16 June 2010

Squeezeslave on Windows 7

This is a quick post to summarise what I've done to get Squeezeslave working on Windows 7 as a service. For those of you that don't know, Squeezeslave is a command line Squeezebox emulator which runs on a PC, so if you can get it auto-starting as a service then your PC effectively becomes a Squeezebox when it's on.

First, you'll need Squeezeslave. You can get that here: Squeezeslave Project Page.  Choose the Windows ZIP version, and unzip it to a directory (I did it to Program Files (x86)/Squeezeslave on my machine).

You can check that it will work by running in a command prompt with the following parameters (note I've used the generic name squeezeslave.exe rather than a version specific name like squeezeslave-0.9-162.exe, but you need to type the name of the file on your machine):

squeezeslave.exe --retry --mac 00:00:00:20:20:01 192.168.1.50

The MAC address specified uniquely identifies the player so you can give it a name in the Squeezebox Server , so pick something unique within your network.  The ip address at the end (192.168.1.50) should be the address of your Squeezebox Server.

If you run as above, you won't get much in the way of feedback from the command, but you should be able to now see a player called "Squeezeslave" in the Squeezebox Server or your remote control and play music through your machine.

While this is good, it's nice to have it running as a service so it's there and waiting all the time your machine is on.  To do this, I used a program called RunAsSvc from these chaps at PrimaSoft.  It's free and it works in Windows 7.

All you do is run the app once it's downloaded (make sure you run as Administrator in Windows 7 otherwise it won't work properly) - you get a dialog box where you specify a name and description for the service (you can put anything in here, but I'd suggest Squeezeslave), then choose the executable file (squeezeslave-0.9-162.exe for example), type the command line, for example:

--retry --mac 00:00:00:20:20:01 192.168.1.50

And hit OK.

If you go to the Services page (Start, Run Services.exe, or get there through Computer Administration in Control Panel), you can check that it's there and started.  You can also make sure it's set to start every time the machine starts.

And you're done - you've now turned your PC into a Squeezebox :)