小编aby*_*byx的帖子

如何在 Windows 2008 Server 上创建运行 .bat 文件的服务?

我已经使用创建了服务

sc create myService binpath=myservice.bat
Run Code Online (Sandbox Code Playgroud)

但是当我启动它时,它失败并显示以下错误消息:

[SC] StartService FAILED 1053:
    The service did not respond to the start or control request in a timely fashion.
Run Code Online (Sandbox Code Playgroud)

在 Win2k3 上,我使用了资源工具包中的 srvany.exe,但没有适用于 win2k8 的资源工具包。目前我已经在我的机器上安装了 srvany.exe,但我认为这不是最好的方法。

谢谢!

windows windows-server-2008 windows-service batch-file

22
推荐指数
4
解决办法
27万
查看次数