1.Windows服务的新增:
sc create VTA_PushService binpath= "D:vtaWindowsPushServicePushService.exe"
红色标记为需要创建的服务名,可自定义,绿色标记为执行文件及其路径。
2.Windows服务的删除:
sc delete VTA_PushService
红色标记为需要删除的服务名。
3.Windows服务的启动状态修改:
假设我们要关闭 Serve服务,那命令就是:
sc config VTA_PushService start= Disabled
Start后面即为启动方式,分别有:auto=自动、 demand=手动、 disabled=已禁用。这
样就可以把 Server服务设置为禁用状态了。如果要把这个服务设置为手动启动,那么就把
start= disabled改为 start= demand可。
注意:" start="与“启动方式”之间有一个空格,不能省略。
4.Windows服务的启动:
net start VTA_PushService
5.Windows服务的停止:
net stop VTA_PushService