如何手动安装、启动、卸载和删除Windows服务

Win7下需要以管理员身份运行cmd

1. 安装服务:
cmd下进入目录:C:\Windows\Microsoft.NET\Framework\v4.0.30319\installutil.exe
运行:installutil D:\work\Projects\AddressMapping\AddressMapping\AddressMapping_WS\bin\Debug\AddressMapping_WS.exe


2. 启动服务:net start Service1


3. 卸载服务
找到目录:C:\Windows\Microsoft.NET\Framework\v4.0.30319\installutil.exe
运行:installutil D:\work\Source\Database06\BasicFunction\DashboardService\3.0\Source\Dashboard_WS\bin\Debug\Dashboard_WS.exe -u

4. 强制删除服务

sc delete 服务名(如果服务名中间有空格,就需要前后加引号)

你可能感兴趣的:(C#.net)