Forum Home
Press F1
 
Thread ID: 51526 2004-11-23 07:17:00 Batch file stopping services Chilling_Silence (9) Press F1
Post ID Timestamp Content User
295319 2004-11-23 07:17:00 Greetings,

Ive got a mate who has a few services he's wanting stopped on his school PC because they're so slow. Most of them are just sorta standard ones in the Service Manager.

He can stop them but not make them manual startup.
Is there any way to make a batch file to stop some of the unneeded services in XP?

One of them thats non-standard is:
C:\WINDOWS\RCSERV.EXE

Any ideas?

Cheers


Chill.
Chilling_Silence (9)
295320 2004-11-23 07:25:00 I should expand - The user wants the likes of theming which shows up as:
C:\WINDOWS\System32\svchost.exe -k netsvcs

To be turned off in a .bat file upon login.

Possible?

Cheers


Chill.
Chilling_Silence (9)
295321 2004-11-23 07:54:00 Chill, I haven&apos ; font-style:italic ; "> ; t got the full answer but I guess you could do something like the following... you can make this as elegant as you like. HTH
You can also write a vbscript/wmi file that will do all this as well and run appropriately with privileges etc. Also you can use the TASKLIST and TASKKILL commands in a batch script... some of the PS tools from SYSInternals.com can be helpful here also. Knowing the long name of the service is helpful, you can use the command SERVICES.MSC to find/see/change these. The main registry point for services is HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es

In a CMD batch script
use the NET STOP {service name} command
e.g.
NET STOP " ; font-style:italic ; "> ; QoS RSVP" ; font-style:italic ; "> ;

To set the values for the service in the registry create a text file (e.g. myregservicefile.txt) with the appropriate values for the service see examples below.
Then from a command procedure you can use REGEDIT /S myregservicefile.txt

Note you normally have to be an administrator to be able to do this, but you can use the RUNAS command passing appropriate commands.


Windows Registry Editor Version 5.00

; font-style:italic ; "> ; Set service to start automatically - value =2
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\RSVP]
" ; font-style:italic ; "> ; Start" ; font-style:italic ; "> ; =dword:00000002


Windows Registry Editor Version 5.00

; font-style:italic ; "> ; Set service to Manual - value =3
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\RSVP]
" ; font-style:italic ; "> ; Start" ; font-style:italic ; "> ; =dword:00000003


Windows Registry Editor Version 5.00

; font-style:italic ; "> ; Set service to disabled - value =4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\RSVP]
" ; font-style:italic ; "> ; Start" ; font-style:italic ; "> ; =dword:00000004
Babe Ruth (416)
295322 2004-11-23 07:55:00 This may be what you want. Clicking download just presents a page that has the batch text. By coincedence its from the US flavour of PCW. :-)

www.pcworld.com
parry (27)
1