开发者

Help creating a service, escaping binPath

I want to create a service and need to escape double quotes in the binPath. The path should be something like this: C:\path_to\service_executable.exe -i "path_to_config_file.conf"

Do I simply double up the double quotes? ie.

binPath= "C:\path_to\service_executable.exe -i ""c:\开发者_运维问答path_to\config_file.conf"""


What comes after the EXE path is considered start parameters (-i "c:\path_to\config_file.conf"). They are specified in a separate field.

If you use Services.msc you can add it in "Start parameters" edit box. If you use a MSI to install the service, you can use the "Arguments" column in ServiceInstall table.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜