Solved

Script to start and stop services

Posted on 2010-08-20
8
525 Views
Last Modified: 2012-05-10
I need a script/batch file to stop / start blackberry services in a certain order on a windows 2003 server
0
Comment
Question by:Martin Gerlach
8 Comments
 
LVL 10

Expert Comment

by:jorlando66
ID: 33484926
net stop service name /parameters etc...
0
 
LVL 10

Accepted Solution

by:
jorlando66 earned 500 total points
ID: 33484982
sc start "BlackBerry Router"
sc start "BlackBerry Dispatcher"
sc start "BlackBerry Controller"
sc start "BlackBerry MDS Connection Service"
sc start "BlackBerry Policy Service"
sc start BBAttachServer
sc start "BlackBerry SyncServer"
sc start "BlackBerry

In that order.  substitute "stop"  to stop services.
0
 

Author Comment

by:Martin Gerlach
ID: 33493157
@Jorlando66

This works great, for some reason only the following command dosnt work

sc stop "BlackBerry Alert"

i am getting the follwoing error:

C:\Documents and Settings\besadmin\Desktop>sc start "BlackBerry Alert"
[SC] StartService: OpenService FAILED 1060:

The specified service does not exist as an installed service.

Any idea why?
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 6

Expert Comment

by:sharjeel ashraf
ID: 33493496
check the spelling in services console and make sure the quotes are in the right place.
also try to stop the services as you have listed in the batch file, sometimes you need to stop and start them in a particular order.
0
 
LVL 10

Expert Comment

by:jorlando66
ID: 33497900
Is the serbice actually installed. If it isnt you don't need the line
0
 
LVL 27

Expert Comment

by:Steve
ID: 33502411
either the service doesnt exist or you've spelt its name incorrectly.
the name to use for staring/stopping is not necessarily the one dispalyed in the main services.msc window. right click the service and use the name next to 'service name'
0
 
LVL 10

Expert Comment

by:jorlando66
ID: 33502804
The names I gave you are the names to use.  If you get that error the service is not installed.  Dont use the line giving you the error..It can be ignored.
0
 
LVL 1

Expert Comment

by:jasonlcss
ID: 33522014
you will probably find that the service giving you the error is a calling service and is only activated by the blackberry application when it is needed.

So it is safe to say that you can use jorlando66's script entries, just remove the file entry that is giving hassels and it should run fine.

Check it out and let us know.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SolarWind and DNS Server 12 79
PowerShell one liner to pull server names 3 59
Event-ID 3001, 3011 - LoadPerf - Windows Server 2003 14 45
ticket bloat 3 31
I have published numerous articles here at Experts Exchange that present programs/scripts written in a language called AutoHotkey. Each of those articles has a brief paragraph describing where to download the product and how to install it. I have al…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question