Sign in with
Sign up | Sign in
Your question

script to switch the window service

Tags:
  • Windows
Last response: in Windows 2000/NT
Share
March 15, 2013 11:26:58 AM

Need a script to switch window service. I have 5 types of window service for each project. Totally 3 projects and 15 services are running. All are running on E:D rive. Need a script to switch the service by passing parameter.

More about : script switch window service

March 15, 2013 12:20:22 PM

What the hell are you talking about????? :pt1cable: 

What windows service you wanna switch ?
m
0
l
March 15, 2013 12:31:02 PM

Write down the Service names (service properties, general tab, Service name)
Open a new .txt file
type "net start (service)" or "net stop (service)" without the quotes and parenthesis
For example: net start AxInstSV
Save the file and rename it to anything.bat
Make separate .bat (batch) files to start or stop services as you wish.
Double click on the file to execute the commands, and you're done!
m
0
l
March 15, 2013 12:41:05 PM

Create a batch file with the following command for each service:

"net stop service nameofservice"

You could laos create a master batch file that takes the service name as a parameter and passes it to another batch file with "net stop service %1" command.
m
0
l
!