Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/drupal/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Batch file 使用命令行将Tanuki软件作为Windows服务重新启动wrapper.exe_Batch File_Vbscript_Autohotkey - Fatal编程技术网

Batch file 使用命令行将Tanuki软件作为Windows服务重新启动wrapper.exe

Batch file 使用命令行将Tanuki软件作为Windows服务重新启动wrapper.exe,batch-file,vbscript,autohotkey,Batch File,Vbscript,Autohotkey,有人知道如何在不通过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:\

有人知道如何在不通过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 -?}
尝试以下操作(以管理员身份运行脚本):

启动服务:

RunWait, %comspec% /c "net start service_name",, Hide
RunWait, %comspec% /c "net stop service_name",, Hide 
正在停止服务:

RunWait, %comspec% /c "net start service_name",, Hide
RunWait, %comspec% /c "net stop service_name",, Hide 
将“service_name”替换为要重新启动的服务名称。 确保您使用的是正确的服务名称,
显示在该服务的属性中(而不是显示名称)。

如何将整个内容放在其中?“c:\Program Files(x86)\Tanuki\bin\wrapper.exe”-s“c:\Program Files(x86)\Tanuki\conf\MTG.conf”我还使用wrapper.exe,它使用MTG.conf中的配置。上面的代码用于自动热键脚本。尝试在AHK脚本中复制代码并以管理员身份运行(使用上下文菜单)。谢谢,它确实启动了服务,但我想在services.mcs或服务管理控制台中看到它的“Running”状态。怎么样?试试看。