通过cmd命令安装、卸载、启动和停止Windows Service(InstallUtil.exe)
来源:互联网 发布:ubuntu 中文字体 编辑:程序博客网 时间:2024/05/04 09:49
set BASE_DIR=%~dp0
%BASE_DIR:~0,2%
echo cd %BASE_DIR%
c:
cd c:\Windows\Microsoft.Net\Framework\v4.0.30319
InstallUtil.exe %BASE_DIR%/WindowsService1.exe
步骤:
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所在的位置,回车即可
- C# windows服务:通过cmd命令安装、卸载、启动和停止Windows Service(InstallUtil.exe)
- C# windows服务:通过cmd命令安装、卸载、启动和停止Windows Service(InstallUtil.exe)
- C# windows服务:通过cmd命令安装、卸载、启动和停止Windows Service(InstallUtil.exe)
- C# windows服务:通过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)
- 通过cmd命令安装、卸载、启动和停止Windows Service(InstallUtil.exe)
- 通过cmd命令安装、卸载、启动和停止Windows Service(InstallUtil.exe)
- 通过cmd命令安装、卸载、启动和停止Windows Service(InstallUtil.exe)
- 用vs命令提示符来使用 Installutil.exe来安装和卸载Windows服务
- 服务(安装 卸载 启动 停止)命令
- Java通过CMD命令启动和停止外部应用程序
- windows服务(安装/启动/卸载/停止)批处理代码
- 不使用installutil.exe安装WINDOWS服务
- 不使用installutil.exe安装WINDOWS服务
- 不使用installutil.exe安装WINDOWS服务
- 深度学习技术在股票交易上的应用研究调查
- 数据库表设计(一对多,多对多)
- Cocoapods更新 ([!] The `master` repo requires CocoaPods 1.0.0 - (currently using 0.39.0))
- 林达华推荐的数学知识
- SVN修改已经提交的LOG日志
- 通过cmd命令安装、卸载、启动和停止Windows Service(InstallUtil.exe)
- unity 动态改变所有子物体的shader
- MySql 数据库导入"Unknown command '\n'."错误解决办法
- 字符串数组的数字转化(拓)
- 配置 WinHTTP 的代理设置
- 交叉编译openssl不修改Makefile的方法
- 从零开始学网络爬虫之json
- UE4物体描边效果及原理
- Maven入门