8 replies
Use this command in a batch:
sc config [Service Name] start=disabled
Make sure you use the service name from when you click on it in services not the display name. If you use the display name it won't work.
Poster rated this answer. Except for the syntax, that was the answer I was looking for. Thanks.
You can also use the Recovery console to disable services using the Disable command.
Also the Windows 2000/2003 Resource Kit has a service.vbs which can be used to control services from the command line.
I think that's off to the right start, but the syntax appears to be incorrect. For instance, if I use the command:
sc config Messenger start=disabled
Then I receive the following output:
Modifies a service entry in the registry and Service Database.
SYNTAX:
sc config [service name] ...
CONFIG OPTIONS:
NOTE: The option name includes the equal sign.
type=
start=
error=
binPath=
group=
tag=
depend=
obj=
DisplayName=
password=
So, I attempt to use the computer name:
sc \\[computer name] config Messenger start=disabled
I get the same output. (It would be nice not to have to use the computer name, so a generic workstation setup could be more automated.)
by lulia
Dunno how many ppl stumbled at this, only to discover there is a space betwwen start= and disabled:
sc config WSearch start= disabled
OK. Here is the correct syntax:
sc config "browser" start= disabled
sc config "messenger" start= disabled
sc config "upnphost" start= disabled
Note the space after the '=' symbol. That worked! Thanks.
by arcomm
Thank you to the posters who got us on the right track. However, more details were necessary so here they are...
You need to specify the "ServiceKeyName" on the sc command-line. As pointed out you cannot use the Display Name. The key name is not readily viewable in the list of services (services.msc). But what you can do is run this command to get the key name. I'll use Computer Browser (the display name) as an example:
sc getkeyname "Computer Browser"
It returns:
[SC] GetServiceKeyName SUCCESS
Name = Browser
The 'Name' output is what you need, in this case case 'Browser' which can be used in the syntax provided in the other posts (e.g. sc stop browser).
This discussion is closed to new replies.
Trending Windows Forum posts
Sort by Trending