[英]Passing parameter to bat file with for installing windows service
I want to create bat file that will install windows service, passed as a parameter. 我想创建将安装Windows服务作为参数传递的bat文件。
This is contents of bat file that is working: 这是正在运行的bat文件的内容:
installutil "D:\MVisum\MVisumCCS\Message Generator\MessageGenerator.exe"
But this is not generic. 但这不是通用的。 I have tried it by: installutil /i 1% and it is not working.
我已经尝试过:installutil / i 1%,它不起作用。 I want to pass path of service that I want to install as a parameter to my bat file.
我想将要安装的服务路径作为参数传递给bat文件。
Please help me out. 请帮帮我。
If your non-generic one is working then try this generic one 如果您的非通用计算机正常工作,请尝试使用该通用计算机
installutil %1
Usage: 用法:
mybatchfile.bat "C:\myservice.exe"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.