Solved

Script to start and stop services

Posted on 2010-08-20
8
522 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
Comment Utility
net stop service name /parameters etc...
0
 
LVL 10

Accepted Solution

by:
jorlando66 earned 500 total points
Comment Utility
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
Comment Utility
@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
 
LVL 6

Expert Comment

by:sharjeel ashraf
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 10

Expert Comment

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

Expert Comment

by:Steve
Comment Utility
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
Comment Utility
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
Comment Utility
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Scenerio: You have a server running Server 2003 and have applied a retail pack of Terminal Server Licenses.  You want to change servers or your server has crashed and you need to reapply the Terminal Server Licenses. When you enter the 16-digit lic…
If like me you are one who spends a lot of time working and scripting with cmd.exe, sometimes it is handy to be able to quickly view a calendar for a given month and year. This script will quickly do just that!  Save the code posted below to a .bat …
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now