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 :)

6 comments:

Unknown said...

Excellent thanks very much for posting this

Anonymous said...

Wonderful !
In this way I "squeezeboxed" computers of my two daughters !
Works perfectly on Windows 7 too :)
Many thanks !!!!

Anonymous said...

Everything works, except that I can't get ASIO to send the sound to my USB DAC, an Audiolab 8200CDQ. Strange because there is no problem doing this with Foobar. Any suggestions?

Anonymous said...

Thanks for this - I've been looking for a solution for a long time. A couple of things to note:

1) RunAsSvc needs to be local on the SqueezeSlave machine. It's not a one-time installer - it runs whenever the service runs.

2) The MAC address is not the MAC address of your local machine - it's effectively a random number by which the SqueezeServer will uniquely identify this client. Better to leave it random, so that the client doesn't show up as a different client depending on whether it's using wired vs. wireless LAN, etc.

3) The uninstall proxess works, but the name of the service isn't what you named it; It's "Pirmasoft ..."

Gil said...

How do you delete the service if you've made a mistake?

AndrewRichards said...

Don't need to explicit state the mac address. And the Squeezebox server can be referenced by name, e.g. "--retry harry" where harry is the Windows name of the server.

Works as described on Windows 7 (x64); thank you!