View Full Version : Stopping and (re)starting Slimserver from a via a DOS command
I seem to be getting access error when I try to backup my Music Directory using Acronis Trueimage 10 if Slimserver is running at the same time (I also have Firefly running at the same time which may also be causing part of the problem)
I want to create 2 simple .BAT files that I can get acronis to run before and after the backup to stop and restart the slimserver service. I've tried simple slimserver.exe /stop from a DOS prompt but this doesn't seem to work. Is there a simple switch i can put after the exe to stop the service (and equally is there another to restart the service??)
Any pointers would be appreciated
cheers
tuttonp
andynormancx
2008-12-08, 03:41
net stop SqueezeCenter
and then
net start SqueezeCenter
The script needs to be working as a user who has rights to stop and start the service though.
Cheers, that's appreciated.
The script will be run locally by the logged on user account. Both the Acronis App and Slimserver are running on the same machine at the same time.
Thanks for the pointer.
You can combine the stop and start into a single line with:
net stop SqueezeCenter && net start SqueezeCenter
You can combine the stop and start into a single line with:
net stop SqueezeCenter && net start SqueezeCenter
I'm sure I can but I'm not sure that would be much use. I think I need to stop Slimserver whilst I'm running my Music Backup and restart it once I've finished the backup. Acronis will allow me to run an operation before starting the backup and another when it has finished. So I intend to create a stopthemusic.bat file containing net stop slimserver and net stop firefly and then create startthemusic.bat file with net start slimserver and net start firefly.
This should mean my backup will run with no library scan and no music running (that said my backup is set to run at 3am so nothing should be running anyway)
You can combine the stop and start into a single line with:
net stop SqueezeCenter && net start SqueezeCenterIs there a 'restart' command or does it have to be two separate commands?
I've been looking for a way to restart the SC service on a server after installing plugins through the Extension Downloader.
Maybe via the 'Execute Script' plugin?
bobkoure
2008-12-18, 09:55
No "net restart" command.
I'm pretty sure "net stop" is blocking, and returns an errorcode of 0 if it was successful, so bonze's
net stop SqueezeCenter && net start SqueezeCenter
does exactly what you want - only run the second command if the first one succeeds
Thanks - I'll give it a whirl :)
Hi there. I refresh this thread. I've always had problem with "net start" and SC. "net stop" works just fine. "net start" tries to start SC, I can see this in the tray icon - the icon of SB Classic starts to have some display. But then it fails with a message "Service could not be started", and the icon soon goes back to disabled state.
If I start the service by mouse clicking (computer management -> services -> start SC), it works fine.
It looks, like starting from command line (net start) gives it some shorter time to start, but I'm not sure.
I remember having this problem always, on my older installation, and after reinstalling (Win XP) it is the same. Is it only me having this problem?
I found stoppin SC stops also SqueezeMySQL service. So I create a batch to make this:
net start SqueezeMySQL
net start SqueezeCenter
But it still doesn't work, the second one fails to start. Any idea?
> But it still doesn't work, the second one fails to start. Any idea?
Try to use the sc.exe command instead. It's the service control tool provided by Windows XP and later.
--
Michael
Try to use the sc.exe command instead. It's the service control tool provided by Windows XP and later.
Thanks, this one works great!
Hi azaz44,
I have the problem under win 7 that squeezecenter does not start automaically.
For now I just linked squeezesrv.exe in my autostart folder.
It works for now but is definetly ugly.
Can you post how you used sc.exe to start squeezecenter as a service?
Is it possible from a normal user account?
May be I could then use a batch in autostart to do it after login.
Thanks
Celindir
Hi azaz44,
I have the problem under win 7 that squeezecenter does not start automaically.
For now I just linked squeezesrv.exe in my autostart folder.
It works for now but is definetly ugly.
Can you post how you used sc.exe to start squeezecenter as a service?
Is it possible from a normal user account?
May be I could then use a batch in autostart to do it after login.
Thanks
Celindir
Well, actually I'm still using SC 7.3.something on my music server. It came with a file called "ServiceEnabler.exe" which I run one day just curious what it does. And as far as I remember, it did all the magic with installing windows service and everything was just running fine.
I also have the new version (called SBS now) on my laptop, and just checked that this file is not shipped anymore. So there must be some other way to make a service , but I don't know it.
I just tried "sc create" command on my laptop several time, but seemed not to work. But now I found I have the service, so I don't know if it worked, or if the service was created byt the installer?
So maybe you have it already?
Well, actually I'm still using SC 7.3.something on my music server. It came with a file called "ServiceEnabler.exe" which I run one day just curious what it does. And as far as I remember, it did all the magic with installing windows service and everything was just running fine.
I also have the new version (called SBS now) on my laptop, and just checked that this file is not shipped anymore. So there must be some other way to make a service , but I don't know it.
I just tried "sc create" command on my laptop several time, but seemed not to work. But now I found I have the service, so I don't know if it worked, or if the service was created byt the installer?
So maybe you have it already?
"Run as a service" is an option in the "control panel" now (rather than appearing anywhere in the web control gui.
Right click the tray icon to get there. You may want to avoid flakes by stopping SBS before changing this setting.
P
Powered by vBulletin® Version 4.1.12 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.