将exe作为服务启动
-- 添加服务 sc create CoServices binpath= D:\sf\code\xky\test\CoServices.exe start= auto DisplayName= CoServices -- 删除服务 sc delete CoServices
-- 查询端口号 netstat -ano|findstr 端口号 -- 杀死该端口进程 taskkill /f /pid 端口号
-- 添加服务 sc create CoServices binpath= D:\sf\code\xky\test\CoServices.exe start= auto DisplayName= CoServices -- 删除服务 sc delete CoServices
-- 查询端口号 netstat -ano|findstr 端口号 -- 杀死该端口进程 taskkill /f /pid 端口号