Windows添加、删除、启动、停止服务

Windows添加、删除、启动、停止服务


创建服务

sc.exe create "服务名" binPath= "路径"

比如:

sc.exe create "MySQL" binPath= "D:\mysql-5.6.47\bin\mysqld.exe"

注意: binPath后面有一个空格

删除服务

sc.exe delete "服务名"

启动服务

sc.exe start "服务名"

停止服务

sc.exe stop "服务名"

猜你喜欢

转载自blog.csdn.net/qq_40579464/article/details/104562030