Jump to content

sc failed to show all the services


caps_buster

Recommended Posts

Since a long time I was wishing to be able to create a batch file, that would stop all the unnecessary (at least for my machine and needs) services. There are two problems. First - I had no idea how to use the net command to change the service config in turn to enable/disable auto startup.

Turns out that sc from Windows 2000 Resource Kit can do the job, so a line like this:

net stop Alertersc config Alerter start= demand

...for each undesired service will work just well.

Not the Second thing. I need list of all of those pesky services. Their names are nowhere near to be found, till I stumbled upon this:

sc query state= all

That is supposed to show me all the service names. And it does, untill:

Enum: more data, need 4286 bytes start resume at index 51

sc_faileo_list_all_services.png

****! Never expected this one to stop me. Any ideas, what to change and where to get more (preferably all) of the resulting output?

I tried:

sc query state= all > trodasservices.txt

...but in the 4275 bytes long file it ends with the same cursed message :( Please help.

Ah! Finally I figured out the bufsize and I can fix the problem with just:

sc query state= all bufsize= 32800

Hoooray!

PS. sometimes one space go a long way, lol. Never managed it to work w/o the space after the "=" ... :D

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...