Archive: I need to disable a NT service!


I need to disable a NT service!
Yes, i´ve searched at NSIS archive about and found a item, but i can´t understand that!

I need just a simple way to set the "dns client" service from 2K/XP at manual start.


There is a plug-in available in the NSIS Archive that handles system services.


Yes, i´ve found that plugin.
At this page, http://nsis.sourceforge.net/archive/...php?pageid=385

but this plugin only installs new services or drivers. I need a way for manage original Windows Services.


For XP/2K services you should be able to use Sc.exe from the Windows 2000 Resource Kit. It has a bunch of options that allow you to configure services from the command line. Use it in conjunciton with a batch file you call from your install script to manipulate the service.

Good Luck!

Edit: The command should be something like SC config "DNS Client" start= disabled

I'm not sure if that is the registered name of the service though. You might have to look in the registry and search for "DNS Client". If I had to guess I would say that the specific registry info would be under HKLM\System\CurrentControlSet\Services\DNSCache

Let us know what you find out


Have you looked at the NSIS Service Lib:

http://nsis.sourceforge.net/archive/...php?pageid=345


THX man! Sc.exe seems to resolve my problem!
:)


In registry, the DNS Client is named as dnscache, i was thinking, if I change the

HKLM\SYSTEM\CurrentControlSet\Services\Dnscache
"Start" from "0x00000002" to "0x00000004" and reboot the system.

This will work?!

------------------------
*The hexdecimal codes for services starting modes
/* Start Type */
#define SERVICE_BOOT_START 0x00000000
#define SERVICE_SYSTEM_START 0x00000001
#define SERVICE_AUTO_START 0x00000002
#define SERVICE_DEMAND_START 0x00000003
#define SERVICE_DISABLED 0x00000004
(from http://nsis.sourceforge.net/archive....php?pageid=385)


You can either do that or just have a batch that calls "sc config Dnscache start= disabled". SC will modify whatever values are necessary in (I'm pretty sure) most of the control sets. (CurrentControlSet, ControlSet001, etc.) CurrentControlSet is the one that actually matters so far as the service, but some different modes for windows call of different sets of services (ie SafeMode, SafeMode w/ Command Prompt, SafeMode w/ Networking)

Use whatever method you prefer, but I personally use SC.exe as its cleaner and easier than modifying all of those values directly.


PattonPending, I will follow your suggestion and use the SC.
I only want to ask a last question, do you know if this sc.exe is present in all Windows NT based versions (such NT4,2K,XP,2003)?


SC.exe will work with any version of windows that follows the NT4 services model.

This means that it should work on NT4, 2000, XP Home, XP Pro. I have personally only used it on XP Pro and 2000, so I can't personally vouch for the other systems.

A Link to The Microsoft Site about SC.exe

That page alone gives you a pretty good feel for the utility and all of the stuff that it can do.

I'm personally using it to create a home-brewed backup system that runs in the background. You can also use SC.exe to create entirely new services, remove services entirely, and tweak everything about services from dependencies to security permissions.


Well, now i do everything i want! thx you for the support!
i will visit the link, thx again...

have a nice day... bye