雷达智富

首页 > 内容 > 程序笔记 > 正文

程序笔记

Windows 下 exe 服务注册到 service 服务中

2024-08-31 18

1添加服务

sc create "Service name" binpath="D:\vv_test.exe" start=auto

vv_test.exe install

2删除服务

sc delete "Service name"

3开启服务

sc start "Service name"

注册服务命令:sc  create  ServiceName  binPath= 程序路径 start= auto

       ServiceName — 需要注册的服务名

          binPath — 程序所在的绝对路径地址   

       start - 启动


注意:在sc命令中,=号前面不能有空格,而=号后面必须有一个空格

更新于:18天前
赞一波!

文章评论

全部评论