|
Question : Scripting: How To set a service to Manual from the command line.
|
|
NET STOP lets you stop a service. NET START lets you start a service.
What can I use from the command line to force a service to Manual, as opposed to Automatic or Disabled?
I can't rely on stopping the service in question after it does an Automatic start, as it works better for it to just wait until my scripts are ready to start it manually.
Would appreciate a simple solution. Thanks.
|
Answer : Scripting: How To set a service to Manual from the command line.
|
|
Create a cmd (call it something like svcstart.cmd) containing the following:
reg add HKLM\SYSTEM\CurrentControlSet\Services\%1 /v Start /t reg_dword /d 00000003
Run it passing the service name as a parameter - eg svcstart.cmd alerter
Note that this requires admin rights.
|
|
|