Windows服务的安装与卸载命令

安装

C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe  %~dp0\WinService.exe

sc config WinServiceName start=AUTO

net start WinServiceName

pause

启动,停止,卸载

net start WinServiceName

net stop WinServiceName

sc delete WinServiceName

pause

你可能感兴趣的:(windows服务)