PDA

View Full Version : HowTo- Install SqueezeSlave as a Windows Service



bagawire
2009-04-01, 02:42
Inspired by the beautiful simplicity of iPeng on my shiny new iPhone, I wanted to be able to control the music playing in the kitchen whilst sitting on the lav upstairs. Don't we all? But the wife has a habit of closing things that are running on the computer in the kitchen before she makes here 78 times daily check of the E! Online RSS feed. So the only solution was to install SqueezeSlave and run it as a service.

Not being the sharpest tool in the box, I spent many hours on this forum last night trying to figure this out. Thanks to many many helpful posts I got there in the end, and wrote up step-by-step instructions (attached and here too: http://bagawire.blogspot.com/2009/04/how-to-install-squeezeslave-as-service.html).
One caveat only, if SqueezeCenter is restarted then the SqueezeSlave service has to be restarted. Two, actually - if the service resides on the same machine as is hosting SqueezeCenter then the service will not start automatically, as it is impatient and will not wait for Squeezecenter to start.
Many of you clever lot out there probably know what to do about these things. If you do, then please step in!
Thanks

ralphy
2009-04-01, 03:56
If you add --retry to your command line parameters, squeezeslave will attempt to reconnect to SqueezeCenter if it looses connection.

ted_b
2009-05-06, 17:57
I have SC 7.4 and a couple of players (Transporter and SB3). I plan to have a firewire DAC (Weiss DAC2) run off my Vista (32 bit) pc and use a software player like SS in order to keep SC as my music server and iPeng/iTouch as my remote control solution.

However, although I've followed (I think) your and bagawire's instructions to the tee (including --retry) I can;t get SC to find SS. Services says its there but not running. When I use the applet to restart it SS starts for 5 seconds then stops, and the applet/Windows comes back with a pop up that says it's a common occurrence for a service to stop if it's not being used. ? What am I doing wrong. I have the regedit stuff (although my registry doesn't show as many keys as the example, such as Enum and Security) , the SC IP address, etc etc. I even loaded LAME files(although not sure why). I use FLAC mostly.

I realize SS won't handle hirez files (and Squeezeplay might, but it's a mess right now) but even if I use it for 16/44.1 that's 90%+ of my library.

Any help is appreciated. thx
Ted

P.S. Also, should it be a local system, local service, or network service?

JJZolx
2009-05-07, 02:15
A couple of additions to your instructions:

If you'll have multiple computers running Squeezeslave then you'll want each to have a unique MAC address. This is set in the AppParameters. As ralphy mentioned, it's also desirable to specify '--retry'. I use a parameters string that looks like:

--signal --retry --mac 01:01:01:01:01:0E 192.168.9.12

If you want the service to start automatically when the machine boots up, set its startup type to 'Automatic' in the Windows services Control Panel applet.

You may also find that it's necessary to run the service under a user account. You can just create a local Windows account on the machine, give the user a password, then in the same Services applet, tell the service to run using this account.

JJZolx
2009-05-07, 02:27
What am I doing wrong. I have the regedit stuff (although my registry doesn't show as many keys as the example, such as Enum and Security), the SC IP address, etc etc.

IIRC, the Enum and Security keys are created when the service first runs. Apparently, it's not starting on your system.

Is there anything in your Windows Event logs?


I even loaded LAME files(although not sure why). I use FLAC mostly.

Only necessary if you'll be transcoding to MP3. Many people run Squeezeslave on a PC at work, so find it necessary to stream lower-bandwidth MP3 rather than FLAC.


P.S. Also, should it be a local system, local service, or network service?

By default, it will be created as a 'Local System' service. You might need to change this to run under a user account. Create a local user with password, then in the service properties go to the 'Log On' tab and change it to use the account you created and enter the password.

jimwillsher
2009-05-08, 02:55
Hmm....it's installed ok for me, but when I start the service it stops again immediately. Nothing in the Windows event log.

I've tried changing the logon to an admin account, and when I run the command line in a DOS box it works ok.

Any ideas?


Jim

ceejay
2009-06-26, 00:03
I am trying to get Squeezeslave to run as a service on a Vista 64 bit system, and have tried to follow the suggested instructions, but am having some security issues I think ... I have read somewhere that srvany is of limited use in Vista systems due to the "improved" security.

I can get squeezeslave to run ok from a command line ... I can wrap the command up in a batch file and have it run on login, but of course I then get the ugly DOS window left over. And in any case I would really like it to be running without a login - i.e. as a service!

But when I try to run the instsrv command I get a message along the lines of "you're not authorised to do that", though I had logged in with an admin account.

Could anyone that has made this work on Vista offer some clues, please?

TIA
Ceejay

PS - a google on the topic throws up a large number of programs offering to do this for varying numbers of $$. Of course I'd rather find a free way of doing this! But one I could trust would be helpful...

fphredd
2009-11-15, 14:23
I am trying to get Squeezeslave to run as a service on a Vista 64 bit system, and have tried to follow the suggested instructions, but am having some security issues I think ... I have read somewhere that srvany is of limited use in Vista systems due to the "improved" security.

I can get squeezeslave to run ok from a command line ... I can wrap the command up in a batch file and have it run on login, but of course I then get the ugly DOS window left over. And in any case I would really like it to be running without a login - i.e. as a service!

But when I try to run the instsrv command I get a message along the lines of "you're not authorised to do that", though I had logged in with an admin account.

Could anyone that has made this work on Vista offer some clues, please?

TIA
Ceejay

PS - a google on the topic throws up a large number of programs offering to do this for varying numbers of $$. Of course I'd rather find a free way of doing this! But one I could trust would be helpful...

Bump/Resurrect...

Same issue in Windows 7 32-bit. Also would prefer free, but if someone knows of a 'reasonably priced' program that works in Windows 7 I'd appreciate the suggestion.

Thanks!

fphredd
2009-11-16, 15:17
Create the registry key in safe mode.

vw195
2009-11-17, 18:23
Bump/Resurrect...

Same issue in Windows 7 32-bit. Also would prefer free, but if someone knows of a 'reasonably priced' program that works in Windows 7 I'd appreciate the suggestion.

Thanks!

Same issue in Win7/64. Setting reg keys in safe mode no dice. Squeezeplay does work with Win7, although some mp3 streams are speeded up.

fphredd
2009-11-18, 07:21
Same issue in Win7/64. Setting reg keys in safe mode no dice. Squeezeplay does work with Win7, although some mp3 streams are speeded up.

Sorry it didn't work for you...I was able to use the guide in safe mode and it worked. Not sure what's different for you?

I know squeezeplay works (using it, though not much need with ipeng connecting to squeezeslave; I meant a program the registry key creation before safe mode solved the issue...for me. ;-)

vw195
2009-11-18, 08:06
Sorry it didn't work for you...I was able to use the guide in safe mode and it worked. Not sure what's different for you?

I know squeezeplay works (using it, though not much need with ipeng connecting to squeezeslave; I meant a program the registry key creation before safe mode solved the issue...for me. ;-)

Hmm well i did not do the entire guide in safe mode perhaps that is it. I shall keep messing with it

fphredd
2009-11-18, 09:35
Hmm well i did not do the entire guide in safe mode perhaps that is it. I shall keep messing with it

Just step 1 in safe mode. The setting up of the key itself once established I was able to do in regular(?) mode...

dhallag
2009-11-20, 14:33
Awesome idea! I get the following error:

Error 1053: The service did not respond to the start or control request in a timely fasion

Any ideas?

fphredd
2009-11-21, 12:51
For some reason, this is no longer working with squeezeslave-asio. The registry key and service work as squeezeslave.exe, and squeezeslave-asio works form a command prompt, but squeezeslave-asio.exe as the Application registry key will not play sound. iPeng sees it, selects the music, no sound...

Ideas, suggestions???

Thanks

ralphy
2009-11-22, 03:35
Did you try renaming squeezeslave-asio.exe to squeezeslave.exe?

fphredd
2009-11-22, 07:22
Did you try renaming squeezeslave-asio.exe to squeezeslave.exe?

No, did rename without the hyphen, but will give your suggestion a shot. Also wondering, when this all started, it was due to another unrelated issue (I think) but I deleted and recreated the registry entry. I didn't even notice the first time, but when I recreated the registry entry, there was no enum key. Could this be related, as the demo does show enum? How do I recreate with that key?

fphredd
2009-11-22, 10:32
Did you try renaming squeezeslave-asio.exe to squeezeslave.exe?

Tried...failed

Just doesn't make sense????

ralphy
2009-11-23, 04:49
How do I recreate with that key?

I haven't used a vista or win7 system yet. I'm still running XP on my squeezeslave build vm. So I'm not likely to be of much help.

Are you using regedit to try and recreate the key?

fphredd
2009-11-24, 15:17
Now that I'm completely frustrated because I can no longer get something to work that worked for me before (eve tried wiping and reinstalling), I figure I'll go the batch file route. Problem is, I'm not sure what to write...

What I want to accomplish is a batch file that does launches as follows:

c:\program files\squeezeslave\squeezeslave.exe --retry 192.168.1.99

if someone could basically hold my hand and tell me the actual batch file statements (yes, I've tried myself first--unsuccessfully) I need to write? Please??

Thanks in advance!

fphredd
2009-11-25, 07:47
Anyone gonna throw me a bone here?

Thanks.

ralphy
2009-11-26, 04:45
Here's what I use



@echo off
:start
"C:\Program Files\Squeezeslave\squeezeslave.exe" -r15 -o7 -m00:00:00:00:00:ff
sleep 10
goto start

fphredd
2009-11-26, 07:11
Very much appreciated!
Actually got it working just before reading your post without the 'sleep' and 'goto start' commands. If I use sleep, what wakes it up? Is that what 'goto start' does--test if it's needed? If not, why the 'goto start'?
One more...will any of the above solve the issue of having to restart squeezeslave after teh computer sleeps?
Thanks for the education...

Sure am baffled still by the service not working only on ASIO. Oh well, as long as I can listen to the music :-)

ralphy
2009-11-27, 05:52
The goto start restarts squeezeslave if it exits or crashes.

The sleep 10 just waits 10 seconds before restarting, that way if ss is continuously crashing, I can control-c to exit the loop.

The computer sleeping will not be fixed by the above, it looks like there's a problem with squeezeslave recovering from sleep, still looking into that issue.

fphredd
2009-11-27, 09:38
The goto start restarts squeezeslave if it exits or crashes.

The sleep 10 just waits 10 seconds before restarting, that way if ss is continuously crashing, I can control-c to exit the loop.

The computer sleeping will not be fixed by the above, it looks like there's a problem with squeezeslave recovering from sleep, still looking into that issue.

Got it. The only issue I've really had is the recovering from sleep. Thanks for the continued work...with ipeng it's just what I needed!

stephanvdplas
2013-01-25, 07:23
Is it possible to make squeezeslave work with a squeezebox server that requires authentication? I can see no place to enter username and password of my squeezebox user.

Thanks,
Stephan