How to add dependency on a Windows Service AFTER the service is installed
2013-09-15 11:46
543 查看
his can also be done via an elevated command prompt using the
Note: There is a space after the equals sign, and there is not one before it. So if you want ServiceA to depend on both ServiceB and ServiceC--that is to say, ServiceA will not start until the other two have started--then you would use this:
Edit: Also, if you want to remove all dependencies, you have to use the following syntax:
Warning:
sccommand. The syntax is:
sc config [service name] depend= <Dependencies(separated by / (forward slash))>
Note: There is a space after the equals sign, and there is not one before it. So if you want ServiceA to depend on both ServiceB and ServiceC--that is to say, ServiceA will not start until the other two have started--then you would use this:
sc config ServiceA depend= ServiceB/ServiceC
Edit: Also, if you want to remove all dependencies, you have to use the following syntax:
sc config ServiceA depend= /
Warning:
depend=parameter will overwrite existing dependencies list, not append. So for example, if ServiceA already depends on ServiceB and ServiceC, if you run
depend= ServiceD, ServiceA will now depend only on ServiceD.
相关文章推荐
- How to resolve: The PsExec service running on ?????????????? is an incompatible version.
- The way to select how large is diesel-engined keep an eye on
- How To Verify the Word Size (32bit vs 64bit) of the Oracle Binary on MS Windows systems (文档 ID 46506
- How to prevent the Program Compatibility Assistant from appearing on Windows Vista
- 【转】How to solve “add/remove operation is impossible, because the code element 'Cxxx' is read only”
- How to Install the Latest GCC on Windows
- How to Find the Java Keytool on Windows?
- RabbitMQ>Erlang machine stopped instantly (distribution name conflict?). The service is not restarted as OnFail is set to ignore.-报错解决方案 原来是NNND。。。
- How to solve “add/remove operation is impossible, because the code element 'Cxxx' is read only”
- [旧稿]How To Add Simple "Install WebPart" Menu to the Right Click On a CAB File
- [转]How to find who is using / eating up the Virtual Address Space on your SQL Server
- How to Delete and Recreate the _msdcs DNS zone on a Windows DNS Server
- how to remain a TObject after the corresponding TFile is closed
- “The execution of scripts is disabled on this system” … How to run your own PowerShell scripts
- How Can I Minimize a VI to an Icon on the Windows System Tray?
- ASP.Net DebugError解决方案[转]:Unable to start debugging on the web server.Debugging failes because integrated Windows authentication is not enabled.
- [Ubuntu] How to add PHP extension after installed PHP?
- How to restore ASM based OCR after complete loss of the CRS diskgroup on Linux/Unix systems [ID 1062
- How to Control the [Add document] button on the bottom of every view?
- 联想电脑重装系统出现Windows cannot be installed to this disk. The selected disk is of the GPT partition style