如何启动任何.exe文件作为Windows服务?

编程入门 行业动态 更新时间:2024-10-28 14:23:00
本文介绍了如何启动任何.exe文件作为Windows服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好!

我正在尝试将Visual Basic .exe文件转换为 Windows Server 2008 上的服务,这就是我做了:

I´m trying to turn a Visual Basic .exe file into a service on Windows Server 2008, this is what I did:

我下载了srvstart.exe然后在cmd上我使用此代码行来创建服务:

I downloaded srvstart.exe and then on cmd I used this code line to create the service:

1. On 系统属性 - 环境变量 - 路径 :我添加了我想要转换为服务的应用的路径。

1.On System Properties - Enviromental Variables - Path : I added the path of the app I want to turn into a service.

2。然后我在cmd上使用了这个命令行:

2. Then I used this command line on cmd:

sc create APP_NAME binpath =" D:\ FOLDER \ APP_NAME .exe " displayname =" APP_NAME "

sc create APP_NAME binpath= "D:\FOLDER\APP_NAME .exe" displayname= "APP_NAME"

On" Service"我可以在列表中看到我的新服务和CMD上的命令 sc qc 我可以看到新服务的配置,所以我认为它是创建的,但是当我尝试启动它时,在cmd上使用 start 命令或在服务列表上右键单击,我得到错误1053该服务没有及时响应启动或控制请求。

On "Service" I can see on the list my new service and on CMD with the command sc qc I can see the configuration of the new service, so I think it created , but when I try to start it, on the cmd with the start command or on the service list with right click,Iget the error 1053The service did not respond to the start or control request in a timely fashion.

有人知道另一种方式来运行申请即服务?或者如何在不重启Windows Server的情况下解决错误1053?

Does someone knows another way to run an application as a service ? or how to solve error 1053 without restart Windows Server?

谢谢!

推荐答案

Google srvany ,instsrv和nssm Google srvany, instsrv and nssm

更多推荐

如何启动任何.exe文件作为Windows服务?

本文发布于:2023-10-22 09:09:55,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1517080.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件   exe   Windows

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!