Custom command line options is lost after service install

496 views
Skip to first unread message

Paul Durbin

unread,
May 7, 2014, 11:35:19 AM5/7/14
to topshelf...@googlegroups.com
I've used AddCommandLineSwitch and AddCommandLineDefinition to add custom switches and parameters. These work fine from the command line but when I run install with the same parameters the custom settings aren't added to the service imagepath reg key.

To get them tp work I have to edit the service imagepath reg key.

IS there a way to get these automatically added when I install the service?

Chris Patterson

unread,
May 7, 2014, 11:46:29 AM5/7/14
to topshelf...@googlegroups.com
I don't think there is currently a way to handle this, sorry.

I'm not sure what type of option would make sense for the install command to add additional command-line arguments.

service.exe install -arguments "-a -b:c"

Hmm, seems like escaping quotes would be needed as well if quotes are in the command-line.



--
You received this message because you are subscribed to the Google Groups "topshelf-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topshelf-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Christian Dalager

unread,
Jul 2, 2014, 9:39:29 AM7/2/14
to topshelf...@googlegroups.com
Chiming in with a use case:

I need to run multiple instances of the same TopShelf Service, but with different names.

I can do that now by providing a different service name during install.

The service is processing messages from queues and every instance will listen to its own queue.
I would prefer to give it as an install argument as it is the only thing that differs from each instance.

over & out & best regards

Christian
Reply all
Reply to author
Forward
0 new messages