Win Services Administration (need help :-)

Microsoft Windows 2003 server - 5 users
August 5, 2010 at 06:50:35
Specs: Windows Server 2003, 1.6ghtz/1GB ram
I have been working on automating shutdown and starting of services in windows heres what i have so far

echo This will stop Some unused Services To Speed UP the PC
DEL /Q ServiceSTOP.log
start/w/b sc stop Alerter
echo Alerter >> ServiceSTOP.log
start/w/b sc stop CryptSvc
echo CryptSvc >> ServiceSTOP.log
start/w/b sc stop TrKWks
echo TrKWks >> ServiceSTOP.log
start/w/b sc stop MSDTC
echo MSDTC >> ServiceSTOP.log
start/w/b sc stop svc
echo svc >> ServiceSTOP.log
start/w/b sc stop ShellHWDetection
echo ShellHWDetection >> ServiceSTOP.log

this is stopping some services and creating a log, i am trying to make it so it only creates the LOG if the service is realy shut down. thats my problem.

the later part enables you to Restart previously shutdown services by this command which reads in the lines from ServiceSTOP.log

and so on the programming for that is

@echo off
setLocal EnableDelayedExpansion

for /f "tokens=* delims= " %%a in (ServiceSTOP.log) do (
set /a N+=1
sc start %%a

Which took me quite a while to make lol

See More: Win Services Administration (need help :-)

Report •

August 5, 2010 at 06:54:00
I am thinking that i may be able to use sc query to check the service is indeed stoped and the somehow write the service name alone to the ServiceSTOP.log

Report •

August 5, 2010 at 07:40:28
Just what do you hope to accomplish with all this?
I would suggest that you are working way too hard for very little gain.

If you are certain that a specific service is really not needed, simply disable it ( I would be very careful with this).
If a service is needed then leave it's configuration on default.

What you are doing could produce a very fragile system that might fail for a wide variety of reasons.

Unless your system is starved for memory all of this is going to net you very little in performance, and give you a potentially unreliable system in the process.

Report •

August 5, 2010 at 15:57:55
This does make a significant diferance to my Laptop speed and also disables some annoying things that i dont want to actualy interupt my music recording.
I like the services enabled at other times when they are needed.

this solution is better than hardware profiles that requires i restart the Laptop.
The system will not fail as i have made sure all services needed to be running stable are running, i have looked into repercussions.
i am using server 2003 as a workstation not server, which time after time has proven much more reliable with good general speeds for the Audio recording workstation.

thankyou :)

Report •

Related Solutions

August 5, 2010 at 16:02:06
If your only interest is knowing which services to start, don't worry about it and just start the services. If said services are running, NET START will complain, but you can ignore it.

Report •

Ask Question