batch command to disable a service?

Operating System, Common Application & ThinkPad Utilities Questions...
Post Reply
Message
Author
mattbiernat
ThinkPadder
ThinkPadder
Posts: 1621
Joined: Sun Aug 27, 2006 12:18 pm
Location: Brooklyn, NY

batch command to disable a service?

#1 Post by mattbiernat » Wed Aug 12, 2009 10:03 pm

i was looking around the next for a batch command to disable a service.
and all i found was this:
sc stop windows update
sc config windows update start= disabled
however it does not work. what am i doing wrong here?

yak
ThinkPadder
ThinkPadder
Posts: 1256
Joined: Thu Dec 06, 2007 3:17 pm
Location: NRW, Germany

Re: batch command to disable a service?

#2 Post by yak » Thu Aug 13, 2009 5:10 am

Try the net command.

Code: Select all

net stop <service_name>
net start <service_name>
For example to stop Windows Update:

Code: Select all

net stop "Windows Update"
Quotes are needed by this one because the service name contains a space char.
ThinkPad™ X201 / AFFS-120
i5-560M 2.67Ghz, 8GB RAM, Samsung 840 Pro 256GB SSD, Win 8 Pro 64-bit, UltraBase X200, ThinkPad Compact USB Keyboard,
Dell U2713HM (2560x1440, IPS), ExpressCard USB 3.0 (2 ports, flush), Nexus 7+10

mattbiernat
ThinkPadder
ThinkPadder
Posts: 1621
Joined: Sun Aug 27, 2006 12:18 pm
Location: Brooklyn, NY

Re: batch command to disable a service?

#3 Post by mattbiernat » Thu Aug 13, 2009 6:30 am

the net stop command works very well however it stops the service instead of disabling it.

jdhurst
Admin
Admin
Posts: 5831
Joined: Thu Apr 29, 2004 6:49 am
Location: Toronto, Canada

Re: batch command to disable a service?

#4 Post by jdhurst » Thu Aug 13, 2009 7:20 am

I think the commands are meant to work dynamically (so there is a NET STOP and NET START pair). If you want to permanently disable a service, consider using the GUI interface for services. ... JDH

K0LO
Senior Member
Senior Member
Posts: 659
Joined: Wed Sep 07, 2005 12:14 pm
Location: State College, PA, USA

Re: batch command to disable a service?

#5 Post by K0LO » Thu Aug 13, 2009 3:53 pm

Matt:

I think your first post was correct except that the name of the service is not "Windows Update" but rather "wuauserv" (look in the "Services" GUI window for the name).

Open the "Services" GUI and try the commands while watching the GUI for feedback. I just tried it to confirm that it works.
Mark

X61T 7764-CTO, Core 2 Duo L7500 LV 1.6 GHz, 4 GB RAM, 120 GB Intel X25M SSD
Multiboot w/Grub4DOS -- Windows 10, MustangPE, PartedMagic
My ex: X41T (2005 - 2009)

mattbiernat
ThinkPadder
ThinkPadder
Posts: 1621
Joined: Sun Aug 27, 2006 12:18 pm
Location: Brooklyn, NY

Re: batch command to disable a service?

#6 Post by mattbiernat » Thu Aug 13, 2009 10:06 pm

ok thanks KOLO. that worked! now could anyone please tell me about a command to enable a service? google doesn't seem to come up with anything..

K0LO
Senior Member
Senior Member
Posts: 659
Joined: Wed Sep 07, 2005 12:14 pm
Location: State College, PA, USA

Re: batch command to disable a service?

#7 Post by K0LO » Thu Aug 13, 2009 10:25 pm

Matt:

To disable Windows Update service: sc config wuauserv start= disabled
To enable Windows Update service: sc config wuauserv start= auto

Other options for the start= parameter are:
start= <boot|system|auto|demand|disabled|delayed-auto>
These are from Vista/Windows 7. I don't think XP has delayed-auto, for example.
Mark

X61T 7764-CTO, Core 2 Duo L7500 LV 1.6 GHz, 4 GB RAM, 120 GB Intel X25M SSD
Multiboot w/Grub4DOS -- Windows 10, MustangPE, PartedMagic
My ex: X41T (2005 - 2009)

mattbiernat
ThinkPadder
ThinkPadder
Posts: 1621
Joined: Sun Aug 27, 2006 12:18 pm
Location: Brooklyn, NY

Re: batch command to disable a service?

#8 Post by mattbiernat » Fri Aug 14, 2009 9:20 pm

thanks that worked again.

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Windows OS (Versions prior to Windows 7)”

Who is online

Users browsing this forum: No registered users and 4 guests