#116278 - 2004-03-17 11:44 AM
Disable a service
|
zdarma
Getting the hang of it
Registered: 2002-10-08
Posts: 83
|
Can anyone tell me how to disable a service under W2K? I know how to stop, start, pause, re-start and basically anything else I want to do to a service, but disable it. I am currently using NETSVC.EXE to stop/start services through a shell in my script. But I do need to disable the service because otherwise it will restart when the machine is rebooted.
I have tried to use MONITOR.EXE to disable certain services, but it doesn't seem to work.
I've checked Technet (an utter waste of time) and searched the web for an answer. I'm now turning to my fellow Kixsters to see if they have an idea.
Thanks in advance, Z.
|
Top
|
|
|
|
#116280 - 2004-03-17 11:57 AM
Re: Disable a service
|
zdarma
Getting the hang of it
Registered: 2002-10-08
Posts: 83
|
Bertje,
That's basically what I do right now for starting / stopping a service and it works like a charm. I just need to disable the service so that it doesn't start at the reboot. I do the following :
Quote:
Shell '%comspec% /c netsvc "THE SERVICE NAME" \\$answer_nt /stop'
I loooked at using the "manual" arguement, but if the user launches an application that calls the service, it will start the service, and I can't have the service running during a migration.
Thx, Z.
|
Top
|
|
|
|
#116282 - 2004-03-17 02:26 PM
Re: Disable a service
|
zdarma
Getting the hang of it
Registered: 2002-10-08
Posts: 83
|
Oh happy, happy, joy, joy
Thanks, never heard of XNET, always saw the directory with my kix sources, but never gave it much thought. I should have though, it worked like a charm. Thanks for the info.
Z.
|
Top
|
|
|
|
#116283 - 2004-03-17 02:38 PM
Re: Disable a service
|
zdarma
Getting the hang of it
Registered: 2002-10-08
Posts: 83
|
To anyone else who may be interested in using "XNET MODIFY". I'd like to let you konw that, although it isn't mentioned in the help text file (xnet.txt) under the MODIFY section, the command to disable a service is the following (atleast its the one I used and it worked).
Code:
Shell '%comspec% /c XNET MODIFY "\\MACHINE NAME\SERVICE NAME" /s:DISABLE'
l8r,
Z.
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 248 anonymous users online.
|
|
|