如何启动任何.exe文件作为Windows服务? [英] How to start any .exe file as a windows service?

查看:417
本文介绍了如何启动任何.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,I get the error 1053 The 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服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆