有人知道如何在不通过services.msc手动触发的情况下重新启动此服务吗?如何将其放入脚本中,使此服务作为服务自动重启?提前感谢!
"c:\Program Files (x86)\Tanuki\bin\wrapper.exe" -s "c:\Program Files (x86)\Tanuki\conf\MTG.conf"我收到这个错误消息:
C:\Users\Ning>"c:\Program Files (x86)\Tanuki\bin\wrapper.exe" -s "c:\Program Files (x86)\Tanuki\conf\MTG.conf"
Attempting to start MTG as an NT service.
Calling StartServiceCtrlDispatcher...please wait.
StartServiceControlDispatcher failed!
The -s and --service commands should only be called by the Windows
ServiceManager to control the Wrapper as a service, and is not
designed to be run manually by the user.
For help, type
c:\Program Files (x86)\Tanuki\bin\wrapper -?}发布于 2017-06-21 14:02:59
尝试以下操作(以管理员身份运行脚本):
启动服务:
RunWait, %comspec% /c "net start service_name",, Hide停止服务:
RunWait, %comspec% /c "net stop service_name",, Hide 将"service_name“替换为要重新启动的服务名称。确保您使用的是正确的服务名称,该名称显示在该服务的属性中(而不是显示名称)。
https://stackoverflow.com/questions/44667698
复制相似问题