Controlling services from the command line
Controlling services from the command line
Author
Discussion

BliarOut

Original Poster:

72,863 posts

263 months

Thursday 14th October 2004
quotequote all
Anyone know how I can control service startup from the command line on 2K?

Googling hasn't revealed much yet.

I know I can start and stop them, but I want to disable ftp & iis from the command line (I don't want to touch the registry implicitly if I can avoid it)

2K3 has SC, Anyone know anything I can use on 2K?

(Oh, and it has to be free and under public licence!)

pdV6

16,442 posts

285 months

Thursday 14th October 2004
quotequote all
net stop msftpsvc

and


net stop iisadmin


>> Edited by pdV6 on Thursday 14th October 10:19

squirrelz

1,186 posts

295 months

Thursday 14th October 2004
quotequote all
I haven't been able to find such a tool. There is "sc" in the W2K resource kit, but you have to buy that don't you?

BliarOut

Original Poster:

72,863 posts

263 months

Thursday 14th October 2004
quotequote all
Sorry, I wasn't clear. I know how to stop and start from CMD, but I want to set the startup type to disabled.

I can use SC on 2K3, but that doesn';t exist on 2K.

I might try SC on 2K and see if it works

pdV6

16,442 posts

285 months

Thursday 14th October 2004
quotequote all
Oh, right. I guess you have a good reason you don't want to simply set it to disabled via the GUI?

BliarOut

Original Poster:

72,863 posts

263 months

Friday 15th October 2004
quotequote all
Yup, writing an installer for a bundled PHP/MySQL/Apache app. I want to be able to run totally independantly from the host machine so I can just copy my app to another host if it breaks.

I still remember the good old days when you could do that, and anything I write must be able to run from a straight copy

So far, it works using a batch file, but it's scruffy. I'll have to see if SC works on 2K.

_DJ_

5,052 posts

278 months

Saturday 16th October 2004
quotequote all
BliarOut said:
Yup, writing an installer for a bundled PHP/MySQL/Apache app. I want to be able to run totally independantly from the host machine so I can just copy my app to another host if it breaks.

I still remember the good old days when you could do that, and anything I write must be able to run from a straight copy

So far, it works using a batch file, but it's scruffy. I'll have to see if SC works on 2K.



SC does work on Windows 2000 and it's installed by default on 2003...

Oh if you really don't care you could just set the value in the registry (because that's all SC and the SCM do anyway....).




>> Edited by _DJ_ on Saturday 16th October 09:55