通过cmd命令安装、卸载、启动和停止Windows Service(InstallUtil.exe)
2011-01-07 16:01
671 查看
通过cmd命令安装、卸载、启动和停止Windows Service(InstallUtil.exe)
分类:技术 2011-01-07 16:01
2144人阅读 评论(0)
收藏
举报
cmdservicewindowspathc
步骤:
1。运行--〉cmd:打开cmd命令框
2。在命令行里定位到InstallUtil.exe所在的位置
InstallUtil.exe 默认的安装位置是在C:/Windows/Microsoft.NET/Framework/v2.0.50727里面,所以你要在cmd里通过cd定位到该位置(cd C:/Windows/Microsoft.NET/Framework/v2.0.50727)
3。操作命令:
1). 安装服务命令:在命令行里输入下面的命令:
InstallUtil.exe Path/WinServiceName.exe
其中Path表示ServiceName.exe所在的位置,回车即可
2). 启动服务命令
net start ServiceName
ServiceName是真正的Service的名称(ServiceBase.ServiceName),跟.exe的名称可能一样,也可能不一样。如果不清楚,就到已安装的服务里面找到你的服务,右键属性里面看服务名称
3). 停止服务命令
net stop ServiceName
4). 卸载服务命令:在命令行里输入下面的命令:
InstallUtil.exe /u Path/WinServiceName.exe
其中Path表示ServiceName.exe所在的位置,回车即可
相关文章推荐
- 通过cmd命令安装、卸载、启动和停止Windows Service(InstallUtil.exe)
- C# windows服务:通过cmd命令安装、卸载、启动和停止Windows Service(InstallUtil.exe)
- 通过cmd命令安装、卸载、启动和停止Windows Service(InstallUtil.exe)
- 通过cmd命令安装、卸载、启动和停止Windows Service(InstallUtil.exe)-大壮他哥
- 通过cmd命令安装、调试 卸载、启动和停止Windows Service(InstallUtil.exe)
- C# windows服务:通过cmd命令安装、卸载、启动和停止Windows Service(InstallUtil.exe)
- 通过cmd命令安装、卸载、启动和停止Windows Service(InstallUtil.exe)
- C# windows服务:通过cmd命令安装、卸载、启动和停止Windows Service(InstallUtil.exe)
- 通过cmd命令安装、卸载、启动和停止Windows Service(InstallUtil.exe)
- 通过cmd命令安装、卸载、启动和停止Windows Service(InstallUtil.exe)
- C# windows服务:通过cmd命令安装、卸载、启动和停止Windows Service(InstallUtil.exe)
- 通过cmd命令安装、卸载、启动和停止Windows Service(InstallUtil.exe)
- C# windows服务:通过cmd命令安装、卸载、启动和停止Windows Service(InstallUtil.exe)
- C# windows服务:通过cmd命令安装、卸载、启动和停止Windows Service(InstallUtil.exe)
- 使用C#代码安装、启动、停止、卸载Windows service(不使用InstallUtil.exe)
- [导入]出现windows启动服务失败(无法从命令行或调试器启动,需要安装InstallUtil.exe)的解决办法
- C#制作Windows service服务系列一:制作一个可安装、可启动、可停止、可卸载的Windows service
- [导入]出现windows启动服务失败(无法从命令行或调试器启动,需要安装InstallUtil.exe)的解决办法
- C#制作Windows service服务系列一:制作一个可安装、可启动、可停止、可卸载的Windows service
- C#制作Windows service服务系列一:制作一个可安装、可启动、可停止、可卸载的Windows service(downmoon原创)