前端之家收集整理的这篇文章主要介绍了
如何通过Delphi禁用服务?,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我使用可以通过Delphi启动和停止服务的例程,但是我也需要禁用它们,可以吗?
@H_
502_3@
解决方法
ShellExecute(0,nil,'cmd.exe','sc config "the service name" start=disabled',SW_HIDE);
ShellExecute(0,'sc config "the service name" start=auto','sc config "the service name" start=demand',SW_HIDE);