General discussion

Locked

Killing Service via Task Manager?

By tscislaw ·
I have an application that is running several things as services on my W2K Server. I need to stop and restart these services via command line in a batch file but I am unable to do so using NET STOP.

I could use KILL to kill the process in task manager, but will that have an adverse effect on the service or anything?

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by ezhou In reply to Killing Service via Task ...

If you use kill the task manager (C>kill taskmgr) the windows just close out. So, you can restart it again (C>taskmgr). It shouldn't have any effect on the service.
edz

Collapse -

Thanks...

by tscislaw In reply to

Thanks for the reply. I figured out why NET STOP wasn't working. I forgot to use quote marks for the services that consist of two seperate words, such as "entercept server".

Collapse -

Except that you don't allow

by AYoshi In reply to

the application to properly close it's files that are in use, or clear it's caches, etc... so you have now possibly introduced some corruption into the application that you killed. Do it enough, and you'll start finding out how much data you lost.
I'd like to know why the Net Stop command doesn't work, as that provide a safer solution.

As an alternative, there is a "NETSVC" utility that comes with the NT 4 Server resource kit that might be useful.

Collapse -

I use the kill utility - NT resource kit

by davidpmartin In reply to Except that you don't all ...

If you have the NT resource kit installed you can use 'pulist' to find the process number of the offending service, and then use the kill command with the process number as the argument. Then use NET START or the GUI to restart the service.

Works for me every time.

Dave

Collapse -

For Services, use NETSVC

by swill57 In reply to Killing Service via Task ...

A command line tool that allows you to start, start, and query the state of a service, by name. It can do this remotely as well, via RPC.

Using Sc.exe and Netsvc.exe to Control Services Remotely (Q166819)

Back to IT Employment Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums