[windows2000] Re: Disable service via batch file

  • From: "Costanzo, Ray" <rcostanzo@xxxxxxxxxxx>
  • To: <windows2000@xxxxxxxxxxxxx>
  • Date: Wed, 10 Sep 2003 12:36:07 -0400

If you have the resource kit, you can use sc to configure services.

sc config TheServiceName start= disabled 


Or you can use a poor man's way and import a .reg file with contents
like this:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TheNameOfTheServic
eInTheRegistry]
"Start"=dword:00000004

Then you can use regedit /s to import that .reg file (assuming the user
running the .bat has permissions).

BTW:

disabled:
"Start"=dword:00000004

manual:
"Start"=dword:00000003

automatic:
"Start"=dword:00000002

Ray at work


> -----Original Message-----
> From: Puetz, Christoph [mailto:Christoph.Puetz@xxxxxxx] 
> 
> 
> I know how to stop a service via command line / batch file - but what
> command is used to disable it? Does anyone know?
> 
> Thanks.
> 
> Christoph
> 


**********************************************************************************************************
The information contained in this e-mail message is intended only for the 
personal and confidential use
of the recipient(s) named above.  Distribution, publication, or retransmission 
of this message is strictly 
prohibited.  This message may be a bank to client communication and as such is 
priviliged and confidential.  
If the reader of this message is not the intended recipient or an agent 
responsible for delivering it to the 
intended recipient, you are hereby notified that you have received this 
document in error and that any 
review, dissemination, distribution, or copying of this message is strictly 
prohibited.  If you have received 
this communication in error, please notify us immediately by e-mail, and delete 
the original message.

The sender of this e-mail specifically "opts-out" of the Electronic Signatures 
and Global and National 
Commerce Act (E-Sign) and any and all similar state and federal acts.  
Accordingly, but without limitation, 
any and all documents, contracts, and ageements must contain a handwritten 
signature of the sender to
be legal, valid, and enforceable.
**********************************************************************************************************


**********************************************************
To Unsubscribe, set digest or vacation
mode or view archives use the below link.

http://thethin.net/win2000list.cfm

Other related posts: