使用InstallUtil.exe安装Windows服务 [英] Install a Windows Service using InstallUtil.exe

查看:2019
本文介绍了使用InstallUtil.exe安装Windows服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道我可以通过类似InstallUtil MyService.exe的命令行使用InstallUtil.exe安装Windows服务.但是,如果我希望服务以MyService.exe -k或MyService.exe/s之类的参数开头怎么办?有谁知道如何安装以参数开头的Windows服务?

解决方案

1)使用InstalUtil安装服务.
2)转到控制面板->.管理工具->服务
3)右键单击新安装的服务,然后选择属性".
4)您可以在启动服务之前在底部的文本框中设置启动参数


I know I can install a windows service using InstallUtil.exe through command line like: InstallUtil MyService.exe.  But what can I do if I want the service starts with parameters like MyService.exe -k or MyService.exe /s ? Does anyone know how to install a windows service that starts with parameters? Thanks.

解决方案

1) Install the service with InstalUtil.
2) Go to Control Panel -> Administrative Tools -> Service
3) Right click on the newly installed service and choose Properties
4) You can set the start parameters in the bottom text box before you start the service


这篇关于使用InstallUtil.exe安装Windows服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆