0
点赞
收藏
分享

微信扫一扫

Windows添加服务命令

  1. 打开命令提示符:在开始菜单中搜索“cmd”,并在搜索结果中找到 CMD 应用程序。
  2. 使用 sc create 命令创建一个新的服务。
  3. 输入服务名称和服务的二进制路径,并选择适当的服务类型选项和启动类型。
  4. 使用 sc config 命令设置服务的启动类型和其他选项。
  5. 使用 sc delete 命令删除服务。

示例代码:

sc create NewService binPath= "c:\example\newservice.exe" DisplayName= "New Service" sc config NewService start= auto

举报

相关推荐

0 条评论