By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,780 Members | 1,549 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,780 IT Pros & Developers. It's quick & easy.

How to specify application parameters to .NET service installer

P: n/a
I have a Console app, a related Service Project and Service Setup /
Installer Project. I would like to have the result of running the
installer.msi file register the service to run with certain
parameters.

How do i specify parameters that the application needs to start up /
run with?
is it in the properties of the ServiceProcessInstaller or
ServiceInstaller objects?
is it in the properties of the Service Setup project?

Background info:
1) I've noticed Windows Services specify parameters after the
executable in the "Path to executable" so getting the installer to put
application parameters to this config setting would probably work
also?
2) the app runs with syntax: "MyApp.exe /f MyApp_ConfigFile.txt"

i hope i've provided enough information to be clear.

thanks, dave

Oct 23 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a

The only way we could find to do it is to modify the registry after
the service is installed (which of course makes the built-in installer
stuff pointless since all it really does for services is make the
registry entry).

Our services run in either console mode or service mode (helpful for
debugging) and we use a command line switch to determine which to use.

If you find a better way I'd love to hear it...

Sam

------------------------------------------------------------
We're hiring! B-Line Medical is seeking .NET
Developers for exciting positions in medical product
development in MD/DC. Work with a variety of technologies
in a relaxed team environment. See ads on Dice.com.

On Tue, 23 Oct 2007 14:57:14 -0700, Dave <dj*********@gmail.com>
wrote:
>I have a Console app, a related Service Project and Service Setup /
Installer Project. I would like to have the result of running the
installer.msi file register the service to run with certain
parameters.

How do i specify parameters that the application needs to start up /
run with?
is it in the properties of the ServiceProcessInstaller or
ServiceInstaller objects?
is it in the properties of the Service Setup project?

Background info:
1) I've noticed Windows Services specify parameters after the
executable in the "Path to executable" so getting the installer to put
application parameters to this config setting would probably work
also?
2) the app runs with syntax: "MyApp.exe /f MyApp_ConfigFile.txt"

i hope i've provided enough information to be clear.

thanks, dave
Oct 25 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.