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 Alerter sc 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
****! Never expected this one to stop me. Any ideas, what to change and where to get more (preferably all) of the resulting output?
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
PS. sometimes one space go a long way, lol. Never managed it to work w/o the space after the "=" ...